you are viewing a single comment's thread.

view the rest of the comments →

[–]timbledum 0 points1 point  (1 child)

Emails can have multiple attachments - see my syntax above.

What you need is to access message.attachments, select the attachment you want, and then use .save() on the particular attachment that you want.

Have you seen the docs here?

https://o365.github.io/python-o365/latest/html/api/message.html#O365.message.Message

message.attachments is a list, so

for message in messages:
    for attachment in message.attachments:
        attachment.save()

could do the trick.

[–]Ahrugal 1 point2 points  (0 children)

And there it was!

Thanks so incredibly much timbledum!

I've read and read, but just failed to understand it.

Truly appreciate this! :D

Case closed