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

Free Support Forum - aspose.com

ArgumentOutOfRangeException loading certain EML files

Using Aspose.Email 3.0.0, there are certain eml files that cannot be loaded and attempting to do so throws this exception:

System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex
at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType) at Aspose.Email.Mail.MailMessage.†( , Boolean , AlternateView ) at Aspose.Email.Mail.MailMessage.a†( , Boolean , AlternateView ) at Aspose.Email.Mail.MailMessage.†( ) at Aspose.Email.Mail.MailMessage…ctor( , Boolean ) at Aspose.Email.Mail.MailMessage.Load(Stream stream, MessageFormat format) at Aspose.Email.Mail.MailMessage.Load(String fileName, MessageFormat format)

I’ve attached a couple of example files, the code to repro is:

public void TestLoad(string sourcePath)
MailMessage mm;
mm = Aspose.Email.Mail.MailMessage.Load(sourcePath);
catch (Exception ex)
Console.WriteLine("Unable to load email " + ex.Message);

Console.WriteLine("Opened mail message " + mm.Subject);

Hi Barry,

We are sorry for the inconvenience caused to you.

I was able to reproduce this issue at my end using the latest version of Aspose.Email for .NET 3.0 and have logged it in our issue tracking system as NETWORKNET-33879 for further investigation by our development team. You will be automatically notified via this thread once the issue is resolved and a fix version is available.

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

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.