choices on reading HTML emails

Arkadiusz Drabczyk arkadiusz at drabczyk.org
Tue Apr 10 10:42:18 UTC 2018


On 2018-04-10, Brian Salter-Duke <brian.james.duke at gmail.com> wrote:
> On Tue, Apr 10, 2018 at 03:57:53PM +0800, Yubin Ruan wrote:
>> Hi,
>> 
>> Can anyone share some approaches for reading HTML emails.
>> Currenlty I use w3m:
>> 
>>     text/html; w3m -I %{charset} -T text/html; copiousoutput;
>> 
>> But sometimes I receive some HTML mails which can not be handled that well by
>> w3m, so I want to open that html attachment in a browser. How can I switch
>> between?
>> 
>> Yubin
>
> I use
>
> text/html; /home/brian/bin/see_html %s

Notice that you don't have to use full paths in .mailcap.  As mutt
passes mailcap commands to sh you can use one of these 2 to make your
.mailcap more portable:

text/html; $HOME/bin/see_html %s
text/html; ~/bin/see_html %s

And if see_html is in your $PATH:

text/html; see_html %s

Personally, I use
https://raw.githubusercontent.com/tampakrap/bin/master/viewhtmlmail.py.
The good thing about it is that it can also display images embedded in
html messages.  I have this in my .muttrc:

macro  pager  <F10>  "<pipe-message>~/bin/viewhtmlmail.py\n" "ViewHTML in browser"
-- 
Arkadiusz Drabczyk <arkadiusz at drabczyk.org>



More information about the Mutt-users mailing list