- If you actually want to read any HTML Email you get, you can get Mutt to delegate arbitrary MIME types to other programs (it will default to your pager for text/* types). Add the following line to your .mailcap file
text/html ; lynx -force_html %s
A more "integrating" alternative is to add set implicit_autoview to your .muttrc and make the .mailcap line something like
text/html ; lynx -force_html -dump %s ; copiousoutput
This will cause Mutt to transparently invoke Lynx and display its output in the integrated pager for any HTML message. (set implicit_autoview enables this for all MIME types with a copiousoutput keyword.)
Incidentally, vilistextum is an excellent tool for such on-the-fly conversion of HTML, as it launches and runs nearly instantly even on old and aging machines, where Lynx takes its sweet time.
Automating messages with Mutt
- If you want to send a message with Mutt with an attachment, like you would with mail(1), use
mutt -a $FILENAME -s $SUBJECT $TO < /dev/null
cat(1)ing a file into mutt doesn't seem to work the same way.
Mutt (and most other command-line mail programs) take stdin(3) to be the body of the message. That won't work if you expect it to add all the nice MIME headers and stuff for attachments.
- To have a more descriptive From: than just root when you happen to be mailing from that account (not something you should do habitually), add these settings to your .muttrc
my_hdr From: email@example.com
set realname="Real Name"
Hooking up with Courier IMAP mailboxes
- If you use MailDir format mailboxes (for example, Courier IMAP) and you want to read them locally with Mutt
- and insert the following line into .muttrc
Part of CategoryMailNotes