mail-parser icon indicating copy to clipboard operation
mail-parser copied to clipboard

Add .eml example with odd behavior

Open sftse opened this issue 1 year ago • 3 comments

This example exhibits strange behavior: mail-parser thinks it has a single attachment, although the only part of the email is plain/text and there is no multipart boundary. Thunderbird does a best-effort attempt at displaying the part as if it were text.

sftse avatar Oct 14 '24 20:10 sftse

I've added a suggestion how to carve out this specific case.

sftse avatar Oct 21 '24 12:10 sftse

Tests are failing for this PR.

mdecimus avatar Oct 21 '24 15:10 mdecimus

Unclear how I missed the failing tests first time around. I've had to adapt the malformed/012.eml test case, but after manual review this seems indeed to be what I was going for. The handling of that case also appears more in line with Thunderbird, Thunderbird sees three .eml attachments, each without attachment. mail-parser only recognizes two attachments on the root email, but given the test case is marked as malformed, this difference might better be resolved in a different PR.

sftse avatar Oct 21 '24 16:10 sftse