环境
系统:CentOS 6.8
mail安装配置
- 安装
# yum install mailx
- 配置
# vim /etc/mail.rc
set from=username@163.com
set smtp=smtp.163.com
set smtp-auth-user=username@163.com
set smtp-auth-password=yourpassword
set smtp-auth=login
测试
# echo hello | mail -s testmail testuser@163.com