0 votes

Hello,
I need to display Emails in the WPF WebBrowser. I am able to create IMail object from .eml file.
Next up I use GetBodyAsHtml method to get the HTML version of the body of the email but without headers (To, From, CC, Subject). Is there a way to get HTML with headers other than manually modyfing Html string produced by the GetBodyAsHtml method?

by (200 points)

1 Answer

0 votes

Email headers and body are 2 separate parts of email - I'd not mixed them in a single HTML view.

Remember to use IMail.GetBodyAsHtml(inlineVisuals: true) so inline images are encoded, or register for cid: protocol to provide data from IMail.Visuals[string id] collection.

by (297k points)

Thank you for the answer. Do you have any other tools for displaying Emails, apart from Html version?

...