Monday, April 02, 2007

Send Attachments with Mutt

Use mutt to send an email through shell.
-a flag to attach an attachment
-s flag is the subject
echo -e creates the message in the body

echo -e "This is the body message of the email" | mutt -a -s "This is the email subject"

1 comment:

Gelma said...

with modern releases of Mutt you have to put attachments at the end, or use "--" after them:

echo -e "ciao" | mutt -s "Subject" -a file_to_attach