Mutt is not viewing text/html inline using mailcap and text browsers

htmlmutt

I use mutt on Linux. It's been working great for years and years, yet earlier this year it got upgraded and "something" changed.

When I get email where the body of the message is html, and the headers show Content-Type: text/html, I used to be able to type v to view the parts, and then press Enter and the HTML content would be displayed using $HOME/.mailcap and the text browser of my choice. .mailcap has an entry text/html; w3m %s; nametemplate=%s.html.

Now, this no longer works and I see the glory of HTML email in all its massive horror. When I press v, it shows there is only one part and it's text/html. I press Enter and it displays the raw HTML. How do I get this to show formatted HTML with my text browser again?

On the other hand, if the email contains text/multipart and one is HTML, or the HTML is an attachment, it works fine. It's only when the body of the message is HTML that it no longer works. It's like mutt is ignoring .mailcap when the text/html is body, and not an attachment.

Best Answer

Mutt changed its behavior in 1.5.21. You can find the details here:

http://marc.info/?l=mutt-dev&m=128478045511699&w=2

Mutt will now display most text/* parts internally via the pager. I'm guessing your system /etc/mailcap has a text/html entry without the "needsterminal" keyword that Mutt is using to render the text.

You can still get the old behavior in the attachment menu by pressing 'm' (view-mailcap) which will always use mailcap for viewing, and should pick up any entries for external viewers ("needsterminal").

Related Question