Problem System.Net.Mail SmtpClient to send the message, while System.Net.Mail only supports explicit SSL
Do not 465 ports, with 25, without Enablessl = true;
{
static void Main (string[] args)
{
SmtpClient client = new SmtpClient ();
Client. Host = "smtp.exmail.qq.com";
Client. Port = 25;
Client. Port = 465;
Client. Enablessl = true;
Client. Timeout = 10000;
Client. Deliverymethod = Smtpdeliverymethod.network;
Client. useDefaultCredentials = false;
Client. Credentials = new System.Net.NetworkCredential ("[Email protected]", "1234567890");
MailMessage mm = new MailMessage ("[Email protected]", "[email protected]", "Test", "test");
Mm. bodyencoding = Utf8encoding.utf8;
Mm. Deliverynotificationoptions = deliverynotificationoptions.onfailure;
Client. Send (mm);
}
}
Finally, when configuring the TFS Mail Notification settings, the port instead of 25, do not select SSL, successfully resolve the issue.
SmtpClient exception reference for sending message timeouts:
Http://blogs.msdn.com/b/webdav_101/archive/2008/06/02/system-net-mail-with-ssl-to-authenticate-against-port-465.aspx
C # send mail with QQ Enterprise email