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

Free Support Forum - aspose.com

The attached msg causes an exception

I call this to open the msg:

msg = MapiMessage.FromFile 
then call this:
var printer = new Aspose.Email.Printing.MailPrinter();
printer.Print(msg, parent.oFilename, Aspose.Email.Printing.PrintFormat.XPS);
but the Print call throws this exception:
System.ArgumentNullException was unhandled
Message=String reference not set to an instance of a String.
Parameter name: s
at System.Text.Encoding.GetBytes(String s)
at . (String )
at . (MapiMessage )
at . (MapiMessage , Stream )
at Aspose.Email.Printing.MailPrinter.Print(MapiMessage message, Stream outputStream, PrintFormat printingFormat)
at Aspose.Email.Printing.MailPrinter.Print(MapiMessage message, String outputFile, PrintFormat printingFormat)

The destination path in parent.oFilename is a legitimate path. The exception occurs because msg.Body is null. If I assign a string containing a single space to msg.Body then there is no exception.

Hi Brian,

Thank you for writing to Aspose support team.

I have tested this message and observed the issue while printing it. This issue is logged under Id:EMAILNET-35089 for further investigation by the product team. I shall write here as soon as some feedback is received in this regard.

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

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