Search code examples
emailexchangelib

How can I distinguish between attachment types in exchangelib?


I've just noticed that Microsoft OWA does not display some attachments. Some people use images in their footer (which are attachments). I'm not sure if the only difference between a "normal" attachment and this emedded attachment is that it is embedded in the email.

Is there another difference? How can I get only attachments which OWA* displays as attachements?

* and probably most other email clients; I think I've seen a similar behavior in Google Mail


Solution

  • Those attachments have a content_id. They are referenced within the mail.body as cid:[CONTENT-ID]. The content_id looks like this:

    cid:[email protected]
    

    where image001.jpg is the filename.