O365 / python-o365

A simple python library to interact with Microsoft Graph and Office 365 API
Apache License 2.0
1.65k stars 419 forks source link

Reading content of .msg and .eml type attachments is not possible #1025

Closed kamalvk18 closed 10 months ago

kamalvk18 commented 10 months ago

Currently what I can see is we have a method defined for saving email type attachments by using message.attachments.save_as_eml(attachment) But there is no method defined for just reading the content. In my case I want to read the content of the .eml type attachment and store it as bytes for further processing.

Please let me know if there is already a possible way to read those attachments.

kamalvk18 commented 10 months ago

I've raised a PR to resolve this. Can you please review and add comments if you find anything to be modified. This is really important for our project.

alejcas commented 10 months ago

Merged ;)

kamalvk18 commented 10 months ago

Thank you.