We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Length cannot be less than zero


Scenario. I try to open attached EML files using Aspose.Email 20.1. EMLs are received from Exchange server, they are in TNEF format - contain winmail.data attachment.

Issue. Aspose.Email throws ArgumentOutOfRangeException with the following message: Length cannot be less than zero.

sample emails for aspose.zip (69.9 KB)


 var m = MailMessage.Load("1.eml", new EmlLoadOptions {
      PreserveEmbeddedMessageFormat = false,
      PreserveTnefAttachments = false,



I have worked with the issue shared by you and have created an issue with ID EMAILNET-39747 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as EMAILNET-39747) have been fixed in this update.