【发布时间】:2011-04-27 10:34:18
【问题描述】:
以下功能在控制台应用程序中有效,但在我的 asp.net 网站中无效。我收到一个错误: 根据验证程序,远程证书无效。
public static void SendEmail(MailMessage mm)
{
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.Credentials = new NetworkCredential("ma@mail.com", "Pass");
smtp.Send(mm);
}
【问题讨论】: