Hi Mariusz,
Hi Mariusz,
Still the same:
Hi Mariusz,
I would like to share that I have tried this scenario using following line of codes and found no exception while loading the message. Output of the program is also given here for your reference. Could you please give a try to the following code and let us know your feedback?
MailMessage mail = MailMessage.load(“Test email 1.msg”);
System.out.println(mail.getSubject());
System.out.println(mail.getBody());
System.out.println(“done”);
Following is the output of the above mentioned code:
Test email 1
MailMessage mail = MailMessage.load(“Test email 1.msg”);
System.out.println(mail.getSubject());
System.out.println(mail.getBody());
System.out.println(“done”);
Test email 1
This email communication and any attachments may contain proprietary, confidential, or privileged information. If you are not the intended recipient, you are hereby notified that you have received this email in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. The sender does not waive confidentiality or any privilege by mistransmission. If you have received this email in error, please notify the sender immediately, delete this email, and destroy all copies and any attachments. ==============================================================================
done
P.S. I have used the latest version Aspose.Email for Java 3.6.0 as mentioned earlier.
With the attached file I can reproduce it all the time.
Hi Mariusz,
I have further investigated this issue. Such kind of exception arises when an attempt is made to load MailMesaage with MSG format, while options.MessageFormat = MessageFormat.Eml (by default it is set to EML). Could you please give a try to the following code sample code and share your feedback with us? If you comment out the second line in the following code sample, the exception will arise, and vanish otherwise.
Sample Code:
MailMessageLoadOptions options = new MailMessageLoadOptions();
options.setMessageFormat(MessageFormat.getMsg());
MailMessage mail = MailMessage.load(strbasedir+"EMAIL_511916\guides.msg", options);
mail.save("Asposeout.msg", MailMessageSaveType.getOutlookMessageFormat());
OK, I will try that, but shouldn’t be the format automatically recognized? Aspose.Words and Aspose.Cells works fine in that area, so Aspose.Email should work in the same way or at least throw more meaningful message?
Hi Mariusz,
Thanks a lot!
The issues you have found earlier (filed as NETWORKNET-34173) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.