On Sat, Oct 24, 2020 at 08:54:18PM +0000, Globe Trotter via Mutt-users wrote:
Lots of people send me mail in HTML format (even though I do not like it). I 
have the following set up in my .mailcap:

text/html; w3m -I %{charset} -T text/html; copiousoutput

so it converts things using w3m more or less okay, however, I am wondering is 
it possible to have an option for viewing using midori/firefox for the cases 
where w3m is not enough?

Yes. In .muttrc:

bind attach <Return> view-mailcap # if you want to see html content using 
Return.

Then in your .mailcap:

text/html;  mutt_bgrun /usr/bin/firefox %s >/dev/null 2>&1; needsterminal
text/html; elinks -dump ; copiousoutput

The second link is the equivalent to your w3m (I use elinks). The second one is a script I found some time ago. You can get a copy here, for example https://github.com/RichiH/mutt_bgrun. It saves the html file in a temp folder, runs firefox and deletes the file.

Then, to use this, just go to the list of attachments in the message, select the HTML file, press Enter and you should have the message in a new firefox tab.

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org

Reply via email to