When i have data in memory stream which i am lo loading to mailmessage…but after successfully loading/creating MailMessage when i try to create MapiMessage object then i am getting error for some mails : “System.Drawing.Image.FromStream” at Aspose.Email.Mapi.MapiMessage.FromMailMessage(MailMessage message)
Can you please try using latest Aspose.Email for .NET 20.8. In case there is still an issue then please share the working sample project reproducing the issue on your end.
Using following sample code, I have not found any issue while loading the 5 EML files shared by you. Can you please try using the latest Aspose.Email for .NET 20.8 on your end and if there is still an issue then please share the working sample project reproducing the issue.
public static void TestEmailLoad()
{
try {
String path = @"C:\Users\mudas\Downloads\Sampleseml\";
var decodedByte = File.ReadAllBytes(path + "Sample4.eml");
MemoryStream memoryStream = new MemoryStream(decodedByte);
MailMessage AsposeMessageObj = MailMessage.Load(memoryStream);
MapiMessage mailobject = MapiMessage.FromMailMessage(AsposeMessageObj);
int s = 9;
}
catch(Exception e)
{
String s = e.StackTrace;
}
}
i have tried using updated aspose already, its not workig. still face same issue.
and above mails are getting fail at my end with error System.Drawing.Image.FromStream when i put entire file which have 2 lack items. i can not share entire file with u.
Since, I am unable to reproduce the issue using the shared code for the files that you have provided therefore, I request you to please share the sample Visual Studio Project along with actual files reproducing the issue so that we may investigate it further.
PS: We have also rolled out Aspose.Email for .NET 20.9 today and you may please try that too.