Thursday, May 26, 2005

The power of mutt

Mutt is an e-mail client that for some reason many people don't know!

It's very powerful, especially when trying to send e-mail from command line with attachements, or similar requirements.
Here's a couple of useful commands I often use.

To send an e-mail with attachment (and no message body) use:
mutt -a attachment_filename -s "Subject goes here" < /dev/null

The above command will send the e-mail with the attachement and subject to The redirect from /dev/null makes sure there is no message body.

If you want to send an HTML e-mail you can use:
mutt -e "my_hdr Content-Type: text/html" -s "Subject" < msg.html

The above command sends an HTML e-mail to, using msg.html as the input file. The -e parameter allows you to change the content type. You can also put this in your .muttrc if you use it often.

For more details see

No comments: