is it possible to have two options for viewing html mail?
Greg Marks
gtmarks at gmail.com
Mon Oct 26 01:12:53 UTC 2020
> 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?
In your .muttrc file, you could insert:
bind attach <Enter> view-mailcap
bind attach <Return> view-mailcap
macro attach "\ef" "<pipe-message>cat > $HOME/Mail/mutt_attachment_temporary_file.html ; /usr/bin/firefox $HOME/Mail/mutt_attachment_temporary_file.html<Enter>"
Then, in Mutt, when you open an e-mail, type "v" to go to the attachments
menu, and navigate to the "text/html" entry, hitting "Enter" will display
the message using w3m, whereas hitting "<Alt>f" will open a copy of
the message in Firefox. Another good option in the .mailcap file,
in place of the w3m command quoted above, is:
text/html; /usr/bin/lynx -force-html -localhost -stdin
In my opinion, requiring a two-keystroke combination such as "<Alt>f"
to open the message in Firefox is a helpful security practice, as
that makes it more difficult to accidentally click on a hyperlink in
a malicious e-mail.
For more options, you could add a similar macro "\em" to open in Midori.
> Lots of people send me mail in HTML format (even though I do not
> like it).
Hopefully, when you quote their messages in your replies to them, it
will include all the raw HTML markup so that they can enjoy it as much
as you did.
Best regards,
Greg Marks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20201025/ed4590f1/attachment-0001.asc>
More information about the Mutt-users
mailing list