Posted by Steve on Mon 10 Jan 2005 at 15:13
Mutt is a console based mail client which can connect to IMAP, or POP3 mail servers. It can also read and write to local mailboxes. For a console client it's very sophisticated, allowing you to customize your setup enormously. One thing that it lacks by default is the ability to read HTML emails though.
If you wish to view HTML mails inside the mutt user interface you'll need to make two changes.
First of all you setup a mailcap file which will automatically dump the HTML text to a readable text-only display, via lynx, links, or w3m. Then you need to tell Mutt that it should do this automatically for all HTML files.
Save the following in a file called ".mailcap" in your home directory. If you already have such a file just add it to the end:
text/html; links %s; nametemplate=%s.html text/html; links -dump %s; nametemplate=%s.html; copiousoutput
If you prefer a different program to render your HTML you can change the links command to that instead - for example w3m, or lynx.
Now we tell mutt that it should automatcally view the text/html parts of message by adding the following to the .muttrc file in our home directory:
These two changes should be enough to make sure that Mutt will dispaly HTML mails for us, and allow us to reply to them properly.