How to get pdf rendition exactly same as displayed in outlook

103 views Asked by At

I am trying to convert a '.eml' to 'mhtml' using Aspose.Email for Java.

Issue:

In Microsoft outlook view some .emi files may show both Name and Email address in the To and From section and some might have only Name in the 'To' section.

My try

The OUTPUT, i am getting is based on the option i supply explicitly i.e. either MhtFormatOptions.WriteCompleteEmailAddress or MhtFormatOptions.WriteCompleteFromEmailAddress

My query How to make it pick automatically based on the outlook view without explicitly providing arguments for particular file as the target rendition has to be exactly similar to what is displayed in the outlook.

enter image description here

For example in the above screenshot only names in the From and To section are displayed in the Microsoft Outlook.

2

There are 2 answers

0
Coffee_lover On BEST ANSWER

Aspose Email 17.5 onwards, they have introduced MhtFormatOptions.DisplayAsOutlook in their api, which in turns displays header as in Outlook

0
Kashif Iqbal On

At present, there is no such way to pick it automatically based on the behavior of MS Outlook. However, in the upcoming version i.e. Aspose.Email for Java 17.2.0, this has been fixed. Stay tuned to our Product Release section for release of this new version. Feel free to write to us on Aspose.Email forum if you have any further query about this.

I work with Aspose as developer Evangelist.