Send email attahment

From Augix' Wiki

Jump to: navigation, search

Shell Script - Sending email attachment - Topic Powered by eve community

I usually use "mail" for sending plain emails and "mutt" for sending attachments.

echo "This is a message" | mail -s "Subject" foo@bar.com
echo "This is a message w/ attachment" | mutt -a file.gz -s "Subject" foo@bar.com

Unix Programming: How to Attach file to email sent from shell

Select whatever you like, each of the belowing does more or less what you want:

metasend -t you@to.tld -s metasend -f yourfile -b -m text/plain -e base64
pine you@to.tld -attach file -I^X
elm -s ok you@to.tld -A y 
echo `cat yourfile`| mutt -a y -s mutt you@to.tld
echo "attached file: xxx.txt"|uuenview -b -a -m you@to.tld -s subjet xxx.txt
mpack -s "file" yourfile you@to.tld
Personal tools