使用mail:
echo "This is message to send" | mail -a /tmp/attachment.txt -s "This is Subject" user@example.com
使用mutt:
echo "This is the message" | mutt -s "subject" user@example.com -a /tmp/foo.tar.gz
使用mail:
echo "This is message to send" | mail -a /tmp/attachment.txt -s "This is Subject" user@example.com
使用mutt:
echo "This is the message" | mutt -s "subject" user@example.com -a /tmp/foo.tar.gz