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.
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.
my_hdr From: test@example.com set realname="Real Name"
export MAIL=~/Maildir/
set folder=~/Maildir/
Part of CategoryMailNotes