System.Net.Mail.SmtpException:
Failure sending mail.
System.IndexOutOfRangeException:
Index was outside the bounds of the array.
System.IndexOutOfRangeException stack trace:
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.SmtpClient.Send(MailMessage message)
Turns out this was a known bug with a hotfix already available:
http://support.microsoft.com/kb/2183292
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=30226
Some other articles I found along the way:
http://stackoverflow.com/questions/2803132/net-4-0-fails-when-sending-emails-with-attachments-larger-than-3mb
http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage
0 comments: