Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Alot does not render all html parts of a message #1578

@lucc

Description

@lucc

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:

  1. put the attached alot-bug-multi-part.txt in your notmuch database
  2. set prefer_plaintext = False in the config
  3. make sure you have a mailcap entry for text/html. A simple one like text/html: cat %s; copiousoutput; should suffice.
  4. Open the mail in alot
  5. see here is the document: but not more 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions