Author: Antoine Date: To: dng Subject: Re: [DNG] Question .mailcap entry for text/html mutt reading HTML
emails
On Friday, 21 November at 00:25, Walter Dnes wrote: > I'm running mutt in X. The default is raw HTML spewage. Setting...
>
>text/html; w3m -I %{charset} -T text/html; copiousoutput;
>
>...gives me readable text. I'd prefer to launch a browser but both...
>
>text/html; /usr/bin/chromium --profile-directory="Default" %s;
>text/html; /usr/bin/chromium --profile-directory="Default" %s; nametemplate=%s.html;
>
>...fail. What am I missing?
I fiddled around for a while with text/html in my mailcap file and
eventually decided to feed the HTML part through a shell script.
The sed line is a bit complicated, obviously, but it just converts
e-mail extended character encoding to HTML extended character encoding
and tidies the source up a bit so browsers can read it more cleanly.
I've probably missed some cases.
I believe this would work with and without a GUI.
It only displays the HTML part. If there are any other parts (CSS,
javascript, pictures...) this script ignores them. I think this is a
limitation with mutt, but it works well enough for me. If I really need
to see pictures, I press "v" in mutt, choose the image part and open
that (image/* defined in the mailcap file).
Best of luck,
- Antoine
--
Explosives. If they don't solve the problem,
they at least make it entertaining.