c# - 此客户端的消息提交速率已超过配置的限制?

标签 c# .net exchange-server

我有一个 for 循环调用一些代码发送电子邮件。我收到以下运行时错误:

Service not available, closing transmission channel. The server response was: 4.4.2 Message submission rate for this client has exceeded the configured limit

谷歌搜索后它似乎与“set-receiveconnector”有关,可能用于交换服务器?谁能告诉我如何解决这个问题?

代码:

             var mail = new MailMessage();
             var smtpServer = new SmtpClient(SMTPServer);

             mail.From = new MailAddress(fromAddress);
             mail.To.Add(toAddress);
             mail.Subject = title;

             mail.IsBodyHtml = isHTML;
             mail.Body = message;

             if(attach != null) mail.Attachments.Add(attach);

             smtpServer.Port = xxx
             smtpServer.UseDefaultCredentials = false;
             smtpServer.Credentials = new NetworkCredential(SMTPUser, SMTPPassword);
             smtpServer.EnableSsl = true;
             smtpServer.Send(mail); //Error occurs here

最佳答案

您可以使用取件文件夹而不是直接发送电子邮件吗?

SmtpMail.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;

这样你只需将消息转储到文件夹中并让交换在准备就绪时发送它们,这样如果你的用户每分钟只能发送 3 个交换应该发送 3 然后在下一次发送另一个 3 等等.

关于c# - 此客户端的消息提交速率已超过配置的限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9033815/

相关文章:

powershell - 使用Powershell在Exchange 2013中确定Exchange Server版本

java - 使用 java EWS API 从 Exchange 检索邮件配额?

exchange-server - 如何获得房间是否为 "available now"与 ews 交换?

c# - 如何在 F# 中返回实现 IAsyncActionFilter 的任务?

c# - 如何限制绑定(bind)到 winforms 控件的大型数据源上 dbcontext 的大小

C# 和接口(interface) - 显式与隐式

c# - 处理同一文件的多个流的最佳方法

c# - 从 .Net 应用程序使用 Azure Monitor Rest API

c# - 在 .NET RESTful 应用程序中使用 Ninject?

c# - 我可以为具有相同扩展名(在同一文件夹中)的不同文件设置不同的 MIME 类型映射吗?