Author: ruki | Posted on: 1/24/2010 2:01:23 AM | Views : 262

hi guys, i am trying to send a email from my website to users of the web using the gmail smtp server. however i got this exception, "AuthenticationException was unhandled by user code. The remote certificate is invalid according to the validation procedure."
MailMessage mail = new MailMessage(); mail.From = new MailAddress(ConfigurationManager.AppSettings["Email"].ToString()); mail.To.Add(new MailAddress(Session["Email"].ToString())); mail.Subject = "the email topic here"; mail.Body ="the body of the email here"; NetworkCredential mailAuthentication = new NetworkCredential(ConfigurationManager.AppSettings["Email"].ToString(), ConfigurationManager.AppSettings["Password"].ToString()); SmtpClient mailer = new SmtpClient(ConfigurationManager.AppSettings["SMTPServer"].ToString(), 587); mailer.Ena ...

Go to the complete details ...