I am getting the above error when sending an email. I get and exception saying : System.Net.Mail.SmtpException: Server does not support secure connections. Below is my code which I am using to set smtp details.
public ActionResult ForgotPassword()
{
using (MailMessage mail = new MailMessage(EmailFrom, EmailTo))
{
SmtpClient SmtpServer = new SmtpClient();
mail.Subject = "Password Reset";
mail.Body = "<br/>Your new temporary password is: Pass12345<br/><br/>";
mail.IsBodyHtml = true;
SmtpServer.Host = "10.98.0.147";
SmtpServer.UseDefaultCredentials = true;
SmtpServer.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
SmtpServer.Port = 25;
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);
}
}