参考文档地址
1.使用sendEmail:http://blog.51cto.com/mofansheng/1921471
该方法发送的邮件在垃圾邮件中
先安装好sendEmail,地址中有方法,该方法不用配置什么文件,直接使用下面的语句就可以完成邮件发送,详情地址中有讲解
sendEmail -f 1xxxxxx987@163.com -t 15xxxxx79@qq.com -s smtp.163.com -u "2017-12-26 Send" -xu 18786610987@163.com -xp LEI123XXX -m "测试成功了"

2.使用mail(简单):https://www.cnblogs.com/imweihao/p/7250500.html
发送命令:echo -e "Linux测试邮件" | mail -s "Linux发邮件测试" 1500470779@qq.com
要配置信息,vim /etc/mail.rc在文件尾部添加一下内容
set from=18786610987@163.com
set smtp=smtp.163.com
set smtp-auth-user=18786610987@163.com
set smtp-auth-password=LEI123PENG #授权码,不是邮箱的密码
浙公网安备 33010602011771号