Free Support Forum - aspose.com

MSG to PDF: Link-Styling

Hi,

we convert MSG-files to pdf using your example. In Outlook, every E-Mail-Adress (in all message types, even text only) get’s linked and highlighted in blue and underlined.

Is there a possibility, that the mail-adresses are highlighted in Aspose too? All links in HTML-mails, which are correctly set with are correct styled.

Tanks in advance

@dvtdaten,

Thank you for contacting Aspose support team.

We are gathering information in this regard and request you to spare us little tile for sharing our feedback.

@dvtdaten,

Thank you for your patience. We have logged this requirement as enhancement under Id:EMAILNET-39007 for detailed analysis later. We will write back here as soon as this feature is implemented or any other update is available in this regard.

@dvtdaten,

Could you please provide us a sample message which is rendered differently by Outlook as compared to Aspose.Email?

This sample message should have email address in the body and it should be viewed correctly in Outlook, however when converted by the latest version of Aspose.Email, it should display different view i.e. email address not highlighted and underlined as compared to Outlook.

Example-Mail: example.zip (7.1 KB)

First two mail-adresses are correctly linked (added as link in outlook), last mail-address is not linked - in outlook it is linked.

@dvtdaten,

Thank you for providing the sample file. We will consider it while analyzing this issue.

@dvtdaten,

The original message has incorrect html. Just save it to confirm this:

File.WriteAllText(path + “incorrect.html”, theMessage.HtmlBody);

There is a last address which is not within the anchor tag and that is why the API doesn’t read it as a link. Outlook parses the HTML and fixes some view problems but Aspose.Email API just reads the HTML body as it is. You can try this proper.html.zip (1.6 KB) to check the issue doesn’t occur.

I know, that the it isn’t wrapped in an anchor-tag in HTML. But I got an issue on my side because Outlook recognizes this as link (and styles it as link), but Aspose has different behaviour to Outlook.

I will comunicate this to our customers, but the aim is to get a PDF that has the same look as in outlook.

Thanks.

@dvtdaten,

Well, we doubt there could be anything more done in this regard from our end as the reason is quite obvious and it is not known how Outlook isn’t affected with this. If you have any information related to this from Outlook, you can share with us for our knowledge.