I can't believe I never thought of this! Brilliant idea. Now just to solve the viewing problem...
# ~/.mutt/mailcap
text/html; w3m -I %{charset} -T text/html; copiousoutput;
# ~/.muttrc
alternative_order text/plain text/enriched text/html # save html for last
auto_view text/html
If you want the full HTML experience, you can use this script [1], which uses python (there also is an older bash version) to convert the mail into standalone html to be viewed inside a browser. # ~/.muttrc
macro index,pager M "<enter-command>unset resolve<enter><clear-flag>N<enter-command>set resolve<enter><pipe-message>viewhtmlmail\n" "View HTML in browser"
1: https://github.com/akkana/scripts/blob/master/viewhtmlmailFor complex HTML to plain text try https://www.google.com/search?q=lynx+convert+html+text .. most text browsers can do a reasonable job of it.
Unfortunately, I think foreign email clients would mangle the HTML just enough to stop this from working. You'd have to start implementing a tag soup type parser to coax incoming mail into something intelligible.
I'm thinking that a multi-pass parser:
1. Is this sane HTML5 markup? I'll eat that.
2. Is this a borked-but-manageable variant? Strip the cruft.
3. Is this Beyond All Hope? Just dump it as ASCII. It'll be blockquoted in reply.
HTML is no longer a peresistent, stable, or universal interchange format.