I have used following code to download attachments from outlook using o365 library.I need pdf, jpg, png all kinds of attachment. But not only attachments , images added in the message body (Not attachments) are also downloading. I don't need image added in message body. How to solve this?
Code:
if mail.has_attachments:
for file in mail.attachments:
file.save(destination)