说明:

         1.本文是用网易smtp服务,QQ的没试过

       2.在Centos7上测试

实现:

       1.关闭本机的sendmail服务或者postfix服务

       

sendmail
# service sendmail stop
# chkconfig sendmail off

postfix
# service postfix stop
# chkconfig postfix off

 



2.修改/etc/mail.rc,增加一下类似N行,指定外部的smtp服务器地址、帐号密码等,前提网易SMTP服务要开启
Centos 发送smtp邮件

Centos 发送smtp邮件


3.然后通过命令来发送邮件
Centos 发送smtp邮件

4.邮箱接收效果
Centos 发送smtp邮件

相关文章: