+1 vote

Hi,

We have a user that received a mail and wonder why pictures and attachments wasn't shown, after it was imported to our system.

I looked in the eml-file and it had a plain text body and an attachment winmail.dat.

Found out it is a mail format Outlook/Exchange are using if you are sending a plain text mail, and the are inline objects in the mail.

Are there any way to interpret the TNEF-message?

Thanks

by

1 Answer

0 votes

Yes, Mail.dll processes winmail.dat attachments (in TNEF format) automatically.

MIME Content-Type must be set to application/vnd.ms-tnef or application/Ms-Tnef so winmail.dat attachment is recognized as TNEF.

It extracts all attachments and visuals, as well as RTF, text and html email body.

Unless you set MailBuilder.ProcessTnefAutomatically to false it should happen by default.

If you want us to examine your message, please contact us directly:
https://www.limilabs.com/blog/i-have-problems-parsing-the-message

by (298k points)

I will check the email for any confidential information and if possible send the mail to you.

I think I have found the problem.

We retrieve the body as html and we expect that inline images are html image tags not text like:
[cid:c5b65529-1623-45d4-88d8-33569ba8b579]

It's IMail.GetBodyAsText that converts images into [alt image attribute] string.

You may want to use IMail.GetBodyAsHtml(true) to inline images using Base64 within data uris.

Please open a new question if you think there is an issue with how images are handled.

...