HTML body regression in mail-parser 3.12.0
See original GitHub issueDescribe the bug
HTML bodies (raw or base64-encoded) without a email boundary
are treated as a binary attachment instead of HTML body content. This bug was not present in 3.11.0.
To Reproduce Steps to reproduce the behavior:
import mailparser
mail = mailparser.parse_from_file(f)
- See error
Expected behavior The HTML body should be parsed as the message body
Raw mail
Samples Warning - includes phishing emails: samples.zip Password: infected
.
Environment:
- OS: Linux
- Docker: No
- mail-parser version 3.12.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
mailparser.io - Mailparser Support Area
Sending emails to mailparser.io, what's the recommended way? Can I parse data from PDF attachments? How can I extract table rows from an...
Read more >stalwartlabs/mail-parser: Fast and robust e-mail parsing library ...
4 and provides a more human-friendly representation of the message contents consisting of just text body parts, html body parts and attachments.
Read more >mail-parser - PyPI
mail-parser is not only a wrapper for email Python Standard Library. ... body; body html; body plain; headers; attachments; sender IP address; to...
Read more >VMware Tanzu Application Service for VMs v3.0 Release Notes
This topic contains release notes for VMware Tanzu Application Service for VMs (TAS for VMs) v3.0. TAS for VMs is certified by the...
Read more >Mailparser - Nodemailer
Advanced email parser for Node.js. Everything is handled as a stream which should make it able to parse even very large messages (100MB+)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fedelemantuano Sorry I just now noticed your replies. I was wrong about the cause of the bug, so my attempts to simplify/redact the emails failed to reproduce the issue. You are exactly right. The issue was caused by PR #64.
Often messages will add a
Content-ID
header to an HTML body part of an email. mail-parser parser still parsed the body correctly, but PR #64 caused those email bodies to also be incorrectly be treated as an attachment.It looks like you already fixed this issue in the
develop
branch. Can you put out a release so I can update my downstream projects?@Passimist, I tested the email in this thread and I did’t have any issue. Can you send me an email with this problem?