I am sending email from my ASP.net web application.
The mails are sending successfully with out fail but most of them are going to spam folder.
Please help me to over come spam filter.
My Send Mail code
public void SendMail(string FromAddress, string ToAddress, string Subject, string BodyText)
{
MailMessage mailMsg = new MailMessage();
mailMsg.From = new MailAddress(FromAddress,"My Name");
mailMsg.To.Add(new MailAddress(ToAddress));
mailMsg.Subject = Subject;
mailMsg.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");
System.Net.Mail.AlternateView plainView = System.Net.Mail.AlternateView.CreateAlternateViewFromString
(System.Text.RegularExpressions.Regex.Replace(BodyText, @"<(.|\n)*?>", string.Empty), null, "text/plain");
System.Net.Mail.AlternateView htmlView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(BodyText, null, "text/html");
mailMsg.AlternateViews.Add(plainView);
mailMsg.AlternateViews.Add(htmlView);
// Smtp configuration
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.mysite.com";
smtp.Credentials = new System.Net.NetworkCredential(FromAddress, "password");
smtp.EnableSsl = false;
try
{
smtp.Send(mailMsg);
}
catch (Exception ex)
{
throw ex;
}
}