Exceeded storage allocation. The server response was: 4.3.1 Message size exceeds fixed maximum message size

错误:

System.Net.Mail.SmtpException: Exceeded storage allocation. The server response was: 4.3.1 Message size exceeds fixed maximum message size
   at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
   at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
   at System.Net.ClosableStream.Close()
   at System.Net.Mail.MailWriter.Close()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)

Google翻译后是:超出存储分配。服务器响应为:4.3.1消息大小固定的最大邮件大小超过

措施:这是邮件带的附件太大造成超过IIS Smtp最大限制,默认是2048k。

         压缩邮件附件应该是正确的选择。

参考:

http://www.codeproject.com/KB/winsdk/ConfigServerSmtp.aspx
Config the Server SMTP IIS to send Mail

http://www.tech-faq.com/understanding-and-managing-smtp-virtual-servers.html
Understanding and Managing SMTP Virtual Servers

http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/8dfb6aae-ebb0-40f9-a8c4-f47c45fd7507/
Size exceed problem in ssis package when sending with the help of SMTP

作者:BobLiu
邮箱:lzd_ren@hotmail.com
出处:http://www.cnblogs.com/liuzhendong
本文版权归作者所有,欢迎转载,未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/liuzhendong/p/2025098.html