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:image001.jpg@01D3151A.F9036A80
    

    where image001.jpg is the filename.