0 votes

How to separate inline images from the attachment?

can we use content id for this?

by (1.6k points)
edited by

1 Answer

+1 vote

Use IMail.Visuals collection to retrieve 'inline' images and IMail.NonVisuals to get real 'attachments' (content-disposition set to attachment).

Mail.dll uses 4 collections to group email attachments:

  1. IMail.Attachments – all attachments found in the email (this list basically combines all other ones).

  2. IMail.Visuals – visual elements, attachments that should be displayed to the user. This list contains images used by HTML content for example.

  3. IMail.NonVisuals – non visual elements, those are real attachments, they have content-disposition explicitly set to attachment by the sender.

  4. IMail.Alternatives – alternative content representations, e.g. ical appointment.

by (293k points)