Using the Epiphany browser to read HTML attachments is not as easy as
you'd think. Here we add a special mailcap file that manages it. To
Use it, symlink it to ~/.mailcap or something like that.
--- /dev/null
+# We avoid using "nametemplate" because it uses a predictable filename
+# under /tmp. The "needsterminal" forces mutt to wait until you press
+# Return before it deletes the file; otherwise, Epiphany will notice
+# that it's gone and show you nothing. Finally, the call to "tidy"
+# ensures that Epiphany will not balk at the invalid HTML prevalent in
+# emails. We ignore errors in "tidy" because we expect a bunch of HTML
+# warnings to remain. The weird subshell construct is there because I
+# don't know how to escape a semicolon.
+text/html; (tidy -quiet -modify %s || true) && /usr/bin/epiphany %s; description=HTML Text; test=test -n "$DISPLAY"; needsterminal;