.NET 4.0失败时带有附件超过3MB大发送电子邮件 [英] .NET 4.0 Fails When sending emails with attachments larger than 3MB

查看:645
本文介绍了.NET 4.0失败时带有附件超过3MB大发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从3.5升级我的.NET Framework 4.0后,我最近有一个问题:

I recently had an issue after upgrading my .net framework to 4.0 from 3.5:

System.Net.Mail.SmtpException:失败发送邮件。 ---> System.IndexOutOfRangeException:索引是该数组的范围之外。在System.Net.Base64Stream.En codeBytes(字节[]缓冲区的Int32偏移的Int32算,布尔dontDeferFinalBytes,布尔shouldAppendSpaceToCRLF)在System.Net.Base64Stream.Write(字节[]缓冲区的Int32偏移的Int32计数)在System.Net.Mime.MimePart.Send(BaseWriter作家)在System.Net.Mime.MimeMultiPart.Send(BaseWriter作家)在System.Net.Mail.Message.Send(BaseWriter作家,布尔sendEnvelope)在System.Net。 Mail.SmtpClient.Send(MailMessage消息)---内部异常堆栈跟踪的结尾---

System.Net.Mail.SmtpException: Failure sending mail. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Net.Base64Stream.EncodeBytes(Byte[] buffer, Int32 offset, Int32 count, Boolean dontDeferFinalBytes, Boolean shouldAppendSpaceToCRLF) at System.Net.Base64Stream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Mime.MimePart.Send(BaseWriter writer) at System.Net.Mime.MimeMultiPart.Send(BaseWriter writer) at System.Net.Mail.Message.Send(BaseWriter writer, Boolean sendEnvelope) at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace ---

我看了这个连接错误列表在这里:<一href="http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage">http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage.

I read this connect bug listing here: http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage.

如果任何人都关心这个问题,请投票支持它连接,所以这将是迟早固定的。

If anyone cares about this issue, please vote for it on Connect, so it will be fixed sooner.

推荐答案

该缺陷已修补:<一href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=30226">https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=30226

标题:KB2183292

Title: KB2183292

发布日期:2010年7月21日

Release Date: 7/21/2010

尺寸:8.58 MB

版本:修复

类别:构建

说明 QFE:System.Net.Mail - SmtpClient类抛出,如果文件附件是例外>超过3MB

Description QFE: System.Net.Mail - SmtpClient class throws exceptions if file attachment is > over 3MB

这篇关于.NET 4.0失败时带有附件超过3MB大发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆