-
Notifications
You must be signed in to change notification settings - Fork 16
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
msg_obj.save_email_file() is saving eml with empty attachments #218
Comments
Hello, I have found the issue: the attachments that are read as binary files, where being corrupted when passed to the olefile library in the msg_parser.py file, in the Message._get_propery_data(). I have corrected the method:
Then, the EmailFormatter._proces_attachments() method, in the email_builder module, method should not decode the bytes stream:
Thanks. |
@danieldiezmallo Thank you for finding the bug. Can you open a PR for the above change ? |
I just opened a PR with similar bug fix but kept bytes decoding in case MimeType is text. Tests ran fine with Python3.10/Windows 10. I'd be very grateful if you could merge the PR, bump version to 1.2.1 and publish it to pypi. Many thanks for this project ! |
has this been released? :) |
Hello,
I have been experimenting with the library to load .msg files in that format and convert them to .eml using the msg_obj.save_email_file() method. The msg file object is loaded normally and everything is successful.
The method correctly saves the bodies and metadata of the emails in the .eml file, but all the attachments are saved in the saved file empty. They contain nothing at all. Is this an issue?
Thanks.
The text was updated successfully, but these errors were encountered: