SpamScope / mail-parser

Tokenizer for raw mails
https://pypi.python.org/pypi/mail-parser
Apache License 2.0
367 stars 87 forks source link

Only parses Undelivered message for emails with bounced emails #112

Closed abbykrishnan closed 1 week ago

abbykrishnan commented 2 years ago

Describe the bug I have a raw email file in which one of the emails bounced. I would assume that I could parse both the 1) Content-Description: Undelivered Message email, as well as 2) the original email that had the bounced email, as there are valid addresses in that message.

To Reproduce Steps to reproduce the behavior:

  1. import mailparser

  2. mail = mailparser.parse_from_bytes(f)

  3. mailparsed_email.to only contains the return email back to sender

  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Raw mail Raw email gist

Environment:

Additional context If there's another place that I need to be referencing to get information about both emails (or parse them into 2), please let me know!

fedelemantuano commented 1 week ago

To review in the new version. I will open a new issue if needed.