Error in converting to .msg format

Code:

ByteArrayOutputStream bos = new ByteArrayOutputStream();

emailMessage_.writeTo(bos);

ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());

MailMessage asposeMailMsg = MailMessage.load(bis);

MapiMessage mapiMsg = MapiMessage.fromMailMessage(asposeMailMsg);

Stack Trace:

java.lang.NullPointerException

at com.aspose.email.ms.System.x.a(Unknown Source)

at com.aspose.email.MapiMessage.a(Unknown Source)

at com.aspose.email.MapiMessage.a(Unknown Source)

at com.aspose.email.MapiMessage.fromMailMessage(Unknown Source)

at com.aspose.email.MapiMessage.fromMailMessage(Unknown Source)

at …

Hi Sandeep,


Thank you for using Aspose.Email and we are sorry for the inconvenience you are facing.

I am afraid to inform that there is no such behaviour mentioned in the API documentation. Could you please supply us with few sample messages that we can use to reproduce this issue at our end? We will investigate this issue further and try to assist you as soon as possible.

Also, I would request you to please use the latest version of Aspose.Email for Java 2.5.0 in your applications.