Is there any way to view text/html inline *only if* we think text/plain is not right?

Cameron Simpson cs at cskk.id.au
Sun May 21 23:36:07 UTC 2023


On 18May2023 19:53, José María Mateos <chema at rinzewind.org> wrote:
>Lately I've been receiving mail in which the text/plain part and the 
>text/html part are at odds. This is typically caused by generator 
>software that ignores text/plain, or uses some old version, etc.

Leaving aside the solutions mentioned, I keep a mutt group for senders 
known to do the text/plain badly. My mutt setup has the following, which 
preferes plain text but flips to html for people in my "htmlers" group 
and a small collection of other conditions:

     ############################
     # alternative-order criteria
     message-hook . 'unalternative_order *; alternative_order text/plain text/html'
     # Apple Mail embeds attachments in the HTML part instead of outside the multipart/mixed
     message-hook '~h "X-Mailer: Apple Mail" ~X 1-' 'unalternative_order *; alternative_order text/html multipart/mixed text/plain'
     # senders who can't seem to master multipart/mixed, and send empty
     # or useless text/plain sections
     # or just badly badly formatted plain text, such as live.com etc
     message-hook '%f htmlers | ~f @no-reply at cc.yahoo-inc.com | ~f @outlook.com | ~f live.com | ~f @facebookmail.com' 'unalternative_order *; alternative_order text/html text/plain'

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Mutt-users mailing list