Hi Sir,
I m sending a activation link but the link is received in spam. Please suggest me.
My code is below.
using (MailMessage mm = new MailMessage("Email Id", userId))
{
mm.Subject = "CTC Account Activation";
string body = "<html><body><div> Hello " + txtName.Text.Trim() + ",";
body += "<br /><br />Please click the following link to activate your account";
body += "<br /><a href = '" + Request.Url.AbsoluteUri.Replace("Default.aspx", "CTCActivation.aspx?ActivationCode=" + activationCode) + "'>Click here to activate your account.</a>";
body += "<br /><br />Thanks </div></body></html>";
mm.Body = body;
mm.BodyEncoding = System.Text.Encoding.UTF8;
mm.SubjectEncoding = System.Text.Encoding.Default;
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "relay-hosting.secureserver.net";
smtp.EnableSsl = false;
NetworkCredential NetworkCred = new NetworkCredential("Email Id", "Pwd");
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 25;
smtp.Send(mm);
return true;
}