모바일 앱에서 등록 할 때 Wcf 서비스와 Xamarin.forms 모바일 애플리케이션이 있습니다. 사용자가 이메일로 이동할 때 웹 서비스에서 사용자에게 이메일 확인을 보내주기를 원합니다. 사용자 계정이 활성화 될 링크를 클릭합니다.이메일 확인 확인
나는 확인 링크에 사용자 ID가 있고 인증 기능과 사용자 ID가 뒤에 오는 서비스 URL을 제공하는 유일한 해결책이 있습니다.
링크에서 wcf 링크를주고 싶지 않으므로 더 안전한 방법이 있습니까?
private void SendEmailConfirmation(String EmailId,string UserId)
{
MailMessage msg = new MailMessage();
SmtpClient smtp = new SmtpClient();
string emailId = EmailId;
msg.From = new MailAddress("[email protected]");
msg.To.Add(emailId);
msg.Subject = "Confirmation email for account activation";
//For testing replace the local host path with your lost host path and while making online replace with your website domain name
//string ActivationUrl = "http://localhost:8665/FetchUserId(emailId) & "&EmailId=" & emailId);
msg.Body ="Thanks for showing interest and registring in <a href='http://www.activationlink.com'> webservice.com<a> " +
" Please Thanks!";
msg.IsBodyHtml = true;
smtp.Credentials = new NetworkCredential("[email protected]", "mypassword");
smtp.Port = 587;
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
//NetworkCredential Credentials = new NetworkCredential("[email protected]", "[email protected]");
//smtp.UseDefaultCredentials = false;
smtp.Send(msg);
}
무엇이 당신의 질문입니까? 그것은 사용자의 신원인가? 확인 링크? – Daniel