When using Aspose.Email 2.6.0, if you attempt to print a draft message from a PST using the MailPrinter, it is possible to get a null reference exception because the From address of the message is null.
As a workaround, you can explicitly set the From property on the message to something before printing, but we would prefer the MailPrinter to just leave this field empty if the From address is null.
Using the attached .MSG, the issue can be reproduced with this code:
var mm = MailMessage.Load(source);
var printer = new MailPrinter() { FormattingFlags = MessageFormattingFlags.MailInfo };
printer.Print(mm, dest, PrintFormat.XPS);
which throws:
System.NullReferenceException
at . .Print(MailMessage , Stream )
at . .Print(MailMessage , Stream )
at Aspose.Email.Printing.MailPrinter.Print(MailMessage message, Stream outputStream, PrintFormat printingFormat)
at Aspose.Email.Printing.MailPrinter.Print(MailMessage message, String outputFile, PrintFormat printingFormat)