MessageFormattingFlags.MailInfo is almost perfect. I need to add a feild

I am utilizing the .msg to tif feature, THANK YOU, however I am in need of printing the attachment name along with the To: From: etc. I can get the string name of the attachment with MailMessage.Attachment however I am not sure how to add that to the printed header of MessageFormattingFlags.MailInfo. Do I need to create a new MessageFormattingFlags that includes the things I want? If so how do i build that object? Thanks.

C#
foreach (MailMessage mailMessage in _MailMessageList)
{
MailPrinter printer = new MailPrinter();
printer.FormattingFlags = MessageFormattingFlags.MailInfo;
printer.Print(mailMessage, “C:\” + mailMessage.Subject + “.tif”, PrintFormat.Tiff);
}

Hi Scott,


Thank you for writing to Aspose support team.

Yes, you need to add another flag to the FormattingFlags of MailPrinter as shown in the following code sample. Please let us know if we can be of any additional help to you in this regard.

Sample Code:


MailMessage mailMessage = MailMessage.Load(“About Aspose - Using Aspose.msg”);

{

MailPrinter printer = new MailPrinter();

printer.FormattingFlags = MessageFormattingFlags.MailInfo | MessageFormattingFlags.Attachments;

printer.Print(mailMessage,mailMessage.Subject + “.tif”, PrintFormat.Tiff);

}

I don’t have that option. Below is a screenshot of what is accessible from that class


Hi Scott,

Could you please share which version of Aspose.Email API are you using? Please download the latest version of Aspose.Email for .NET 4.9.0 from our product download page and give it a try. Please let us know your feedback then.

Upgraded to 4.9 and it works. Thank you

Updated and it works well. Thanks

Hi Scott,


Thank you for providing the feedback. Its good to know that your issue is resolved. Please feel free to contact us if you have any other inquiry related to Aspose.Email. We’ll be glad to assist you further.