On Mon, 16 Sep 2019, tallship@tilde.team wrote:
Yeah, I've never really been much of a fan of HTML mail, and I'm prolly too lazy to bother piping it through lynx ;)
HTML in email is ... I do not have an appropiate word for it, so let's just say big pile of poo.
For mutt it's fairly simple. On .muttrc:
set mailcap_path=~/.mutt/mailcap auto_view text/html
Then on the mailcap file:
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
That will filter through lynx any html only email.
For really shitty stuff where lynx cannot help (like 90% of official goverment or bank emails and other stuff that you "need"), I have a hackish solution.
On .muttrc:
macro attach 'V' "<pipe-entry>cat >~/tmp/mail.html && firefox --private-window ~/tmp/mail.html && sleep 1 && rm ~/tmp/mail.html<enter>"
That saves the html part of the email to a file and opens a FF window. Then cleans after itself.
Hope somebody finds it useful.
Cheers,