CentOS使用sendmail发送邮件

CentOS是一个非常不错的免费开源Linux系统,许多站点首选的平台。然而CentOS默认不能发送邮件,需要发送邮件的童鞋可以安装一个sendmail程序。

如果没有安装sendmail,执行:

yum -y install sendmail

然后启动sendmail:

service sendmail start

发送邮件:

1、自定义发件人:

mail -s "IMS and server status report" aa@qq.com -- -f bb@cni23.com < test.log

2、使用系统发件人:

mail -s "IMS and server status report" aa@qq.com < test.log
原文地址:https://www.cnblogs.com/yhdsir/p/5026436.html