email2pdf
email2pdf copied to clipboard
Regression: getting lots of detached plain text copies where HTML is perfectly OK
Looks like we may not be correctly handling emails with multipart/alternative, e.g.:
I 1 <no description> [multipa/alternativ, 7bit, 38K]
I 2 ├─><no description> [text/plain, quoted, us-ascii, 1.8K]
I 3 └─><no description> [multipa/mixed, 7bit, 36K]
I 4 ├─><no description> [text/html, 7bit, us-ascii, 3.4K]
A 5 ├─>XXX.PDF [applica/pdf, base64, 32K]
I 6 └─><no description> [text/html, 7bit, us-ascii, 0.2K]
Plan to resolve:
- Write tests to support multipart/alternative to validate failure (e.g. the one in the comment above fails).
- Fix email2pdf to support multipart/alternative messages, selecting HTML in preference, then plain text. Should always handle all non-HTML/plain text attachments, though.