Mutt and Lynx

by Patrick Connelly posted on April 21, 2009

So, in my time with mutt, I have grown to have a disdain for people that send HTML only email. And surprisingly, this happens alot! So, instead of trying to change the world, I’ve decided to just use mutt and lynx to my advantage and call it a day. Thanks to one of my co-workers for showing me how to do this.

At the end of your ~/.mailcap file, add the following

text/html; lynx -dump -width=78 -nolist %s | sed ‘s/^   //’; copiousoutput; needsterminal; nametemplate=%s.html

Then, in the ~/.muttrc add

auto_view text/x-vcard text/html text/enriched

And restart mutt. This will use lynx to render the email. You can substitute lynx for any text-based html browser you’d like.