yum install mailx –y

vi /etc/mail.rc
set from=xxx@163.com
set smtp="smtp://smtp.163.com:25"
set smtp-auth-user=xxx@163.com
set smtp-auth-password=12345
set smtp-auth=login
set nss-config-dir=/etc/pki/nssdb/mail/

echo "test 123456"|mail -v -s "title" xxx@163.com

zabbix 配置发送邮件报警:

https://www.cnblogs.com/chenmh/p/7253052.html