-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"True" Attachments In Mails #562
Comments
I'm not sure how to do that. If you look at exchangelib/exchangelib/attachments.py Line 36 in fd1452c
Another possibility is to go through the HTML body of the messages and find references to the attachments that are supposed to be shown in-line, and ignore those. |
Thanks, fields list will be of help for this, I believe. |
I believe what you're referring to are inline attachments. Here's how I deal with that using the if hasattr(email_item, "attachments"):
for attachment in item.attachments:
if hasattr(attachment, "item"):
# Do things with attached Exchange items like .eml attachments
if attachment.is_inline:
continue # or do something else I believe any attachment that makes it past those checks should be a regular attached file. Hope this helps! |
Yes, |
Thanks, nstr10. This helped me too. |
Hi,
This issue of mine is probably not directly related with the exchangelib library itself but maybe someone can help me. I download and save the attachments of mails into varios folders using exchangelib and my problem is that not only the files that are attached to mails but also the embedded images are retrieved in the form of attachments. When I query the same mail on Outlook, such embedded images are not seen as attachments (there is to attach picture displayed for them), yet the images are retrieved anyway through the library. Is there a way to only look for the "real" file attachments?
The text was updated successfully, but these errors were encountered: