email2pdf icon indicating copy to clipboard operation
email2pdf copied to clipboard

Regression: getting lots of detached plain text copies where HTML is perfectly OK

Open andrewferrier opened this issue 8 years ago • 2 comments

andrewferrier avatar Aug 24 '16 06:08 andrewferrier

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]

andrewferrier avatar Sep 11 '16 17:09 andrewferrier

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.

andrewferrier avatar Sep 11 '16 17:09 andrewferrier