Error when opening MSG message

Aspose.Email 3.4.0 for Java fails opening the attacheed MSG message with the following exception:

Caused by: java.lang.IllegalArgumentException: Decode Overflow: insufficient space in the 'chars' array.
at com.aspose.email.private.g.a.a(Unknown Source)
at com.aspose.email.ms.System.IO.l.g(Unknown Source)
at com.aspose.email.ms.System.IO.l.e(Unknown Source)
at com.aspose.email.gD.b(Unknown Source)
at com.aspose.email.gD.a(Unknown Source)
at com.aspose.email.gD.b(Unknown Source)
at com.aspose.email.MailMessage.b(Unknown Source)
at com.aspose.email.MailMessage.load(Unknown Source)


Thanks in advance for a quick fix.
Regards,
Mariusz Pala

Hi Mariusz,


We are sorry for a delayed response.

I was able to reproduce this issue at my end using the latest version of Aspose.Email and have logged it in our issue tracking system for further investigation by the development team. We’ll notify you here once there is an update available or the fix version available for this issue.

Hi Mariusz,


Could you please try this issue with the latest version of Aspose.Email for Java 3.6.0, as I was not able to reproduce this issue at my end using this latest version. Please let us know your feedback then.

Still the same:


Caused by: java.lang.IllegalArgumentException: Decode Overflow: insufficient space in the ‘chars’ array.
at com.aspose.email.private.g.a.a(Unknown Source)
at com.aspose.email.ms.System.IO.l.g(Unknown Source)
at com.aspose.email.ms.System.IO.l.e(Unknown Source)
at com.aspose.email.gD.b(Unknown Source)
at com.aspose.email.gD.a(Unknown Source)
at com.aspose.email.gD.b(Unknown Source)
at com.aspose.email.MailMessage.b(Unknown Source)
at com.aspose.email.MailMessage.load(Unknown Source)

Regards,
Mariusz

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

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.


Regards,
Mariusz Pala

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?

Can you log that as an enhancement?

Thank you,
Mariusz Pala

Hi Mariusz,


Thank you for sharing your concerns.

We already identified this need after investigating this issue further and it was logged as NETWORKNET-34181 which is fixed by now. The upcoming versions of Aspose.Emial for .NET as well as Java will include this as fix. I have already linked this thread with the logged ticket so that once the fix version is available, you’ll be notified accordingly.

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.