Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,



Following error is thrown when forwarding or sending email via Send to Me on the Archive Manager website:

[2824015512-728026528-0-0x0] Error has been handled

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 ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at AfterMail.Utility.Mime.MailMessageEx.Send(String mailserver, Int32 port, String user, String password, Boolean enableSsl, Boolean trustAllCerts, Boolean sendFromProxy)
at Quest.AM.UI.Website.SendMessageController.SendMessage(MailMessageEx message)
at Quest.AM.UI.Website.SendMessageController.ConstructAndSendMessage(Attachment[] attachmentDetail)
at Quest.AM.UI.Website.SendMessage.SendMimeMessage()

or

""Exception has been thrown by the target of an invocation" error



This issue occurs if the .NET Framework 4.0 - based application that uses the "System.Net.Mail.SmtpClient" class and if the email attachment is larger than 3MB.
Posted
Comments
sadhana4 13-Feb-15 4:05am    
large than 1kb

1 solution

You need a hotfix that resolves this issue - http://support.microsoft.com/kb/2183292[^].
 
Share this answer
 
Comments
sadhana4 13-Feb-15 4:49am    
i went this link.but my window server 2008 and framework4.0
sadhana4 13-Feb-15 4:50am    
i m not getting what to do
sadhana4 13-Feb-15 5:39am    
In fact , the problem is that the mail with attchments could be sent successfully, however , each attachment must be smaller enough, e.g , each attachment must be less than 10KB.If some attachment more than 10KB, the mail will be sent failed.
My OS is Window Server 2008 with SP1.
Abhinav S 13-Feb-15 6:32am    
Install this hotfix and then try again.
sadhana4 15-Feb-15 9:58am    
i m try but it is given page is not found

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900