使用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

 

 

from:https://linux.cn/article-5502-1.html

posted on 2018-04-04 09:59  Go_Forward  阅读(170)  评论(0编辑  收藏  举报