将在几分钟内发送2-8次。这种情况并不是一直都在发生,也不是每次他们给同一个收件人发邮件时都会发生这种情况;这似乎是随机的。
我的邮编是
SmtpClient oSmtpClient = new SmtpClient();
oSmtpClient.Port = oSmtpSection.Network.Port;
oSmtpClient.EnableSsl = bool.Parse(oSmtpSection.Network.EnableSsl.ToString());
oSmtpClient.UseDefaultCredentials = true;
oSmtpClient.Host = oSmtpSection.Network.Host;
oSmtpClient.Credentials = new NetworkCredential(oSmtpSection.Network.UserName, oSmtpSection.Network.Password);
//Add this line to bypass the certificate validation
System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate(object s,
System.Security.Cryptography.X509Certificates.X509Certificate certificate,
System.Security.Cryptography.X509Certificates.X509Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
};请帮帮忙。
发布于 2014-03-13 07:17:59
这段代码没有你要找的问题。您必须从其他方法调用此方法(代码段)。这个方法被多次调用。您需要在这里调试/登录,以知道调用了多少次。
https://stackoverflow.com/questions/22371616
复制相似问题