我正在尝试发送大量邮件,但无论我发送多少邮件,我都只收到 500 封邮件。我正在循环发送邮件。这是一个示例。
foreach (EmailInfo data in emaildata.ToArray())
{
SmtpClient smtpClient = new SmtpClient();
MailMessage mailMsg = new MailMessage();
smtpClient.Send(mailMsg);
smtpClient.Dispose();
}
我正在使用.net framework 4.0
. 发送 500 封邮件后出现此异常
Service not available, closing transmission channel. The server response was: too many connections
.