配置smtp服务器
# vim /etc/mail.rc
set from=username@sina.com
set smtp=smtp.sina.com
set smtp-auth-user=username@sina.com
set smtp-auth-password=mailpwd
set smtp-auth=login
发送命令
#快速发送
#echo "正文内容" |mailx -s "主题" 收件地址@qq.com
#正常发送
#mailx -s "主题" -r 发件人@126.com 收件人@163.com < /tmp/正文内容.tmp
其他选项
-r 指定发件人
-c 指定抄送人
-b 指定密送人