20170527-html_emails_in_mutt.md (967B)
1 I love minimal terminal based applications where ever I can use them. This means that I use [mutt](http://www.mutt.org) for viewing emails on my Linux system. One thing that is becoming more common is the use of HTML emails, which don't display very well in the terminal. Instead of seeing the content as the sender would like you to, all you see is the HTML code. 2 3 By adding the following lines to your ".muttrc" config file 4 ``` 5 alternative_order text/plain text/html 6 auto_view text/html 7 ``` 8 9 and creating a new ".mailcap" file in your home directory with the following (change browsers Firefox and Lynx to your preferred applications) 10 ``` 11 text/html; /usr/bin/firefox %s >/dev/null 2>&1; needsterminal 12 text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput 13 ``` 14 15 next time you open HTML emails in mutt the content is displayed in your browser. 16 17 Thanks to [TerminalMage.net](http://terminalmage.net/2014/03/16/how-i-read-html-email-with-mutt.html) for the tip.