如图: 

 

配置内容

set from=XXXXX@qq.com
set smtp=smtp.qq.com  
set smtp-auth-user=XXXXX@qq.com
set smtp-auth-password=授权码 #在邮箱后台申请
set smtp-auth=login  

 发送内容:

# 格式:echo 邮件正文 | mail -s "邮件标题" -a 附件地址  收件邮箱

echo hello word! | mail -s "title" -a ./1.txt 1234222@qq.com