Skip to content

Instantly share code, notes, and snippets.

@mgedmin
Created February 2, 2017 15:39
Show Gist options
  • Save mgedmin/e57b12989fd287a3329b46331e664222 to your computer and use it in GitHub Desktop.
Save mgedmin/e57b12989fd287a3329b46331e664222 to your computer and use it in GitHub Desktop.
Handling HTML mail with Mutt
# HTML (when you press Enter in the attachment list)
text/html; /usr/bin/links -html-assume-codepage %{charset} '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
# maybe also consider -html-hard-assume 1
# HTML mail (rendered in Mutt's pager and also what you get when replying)
text/html; /usr/bin/w3m -dump -s -o display_link=yes -o display_link_number=yes -o decode_url=yes -T text/html -I %{charset}; copiousoutput; description=HTML Text
# render HTML and some other types as text
auto_view text/html application/text application/pdf
# many companies send very poor text/plain parts, so prefer html to text/plain
alternative_order text/enriched text/html text/plain text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment