-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Describe the bug
Not all html parts of a multi part email are rendered in alot.
Software Versions
- Python version: 3.8.9
- Notmuch version: 0.31.4
- Alot version: 0.9.1 & master @ 0.9.1-38-ga814a774
To Reproduce
Steps to reproduce the behaviour:
- put the attached alot-bug-multi-part.txt in your notmuch database
- set
prefer_plaintext = Falsein the config - make sure you have a mailcap entry for
text/html. A simple one liketext/html: cat %s; copiousoutput;should suffice. - Open the mail in alot
- see
here is the document:but notmore important text!
The problem
Some mail user agents (like Apple Mail in this case) produce a multipart mixed mime part when the user drags and drops a external file in their mail. They can write text above and below the document in the user interface so they do not notice anything strange. If Apple mail can,it will even display the document in the middle. The resulting mail has a text/html part followed by a application/pdf (or whatever) part and another text/html part.
Alot only renders the first html part potentially hiding important information from our users!
Proposed solution
We should iterate over all items in a multipart/mixed and for each one decide if we can render it.