CentOS 6.6使用sendmail登陆第三方邮件系统发邮件

                          sendmail如何设置第三方服务器发邮件


  1. yum install sendmail


2、停止postfix邮件服务,(系统默认打开,占用25端口)

#service postfix stop


3.修改配置文件,添加5行 set 有关内容

#vim  /etc/mail .rc
# Outgoing messages are sent in ISO-8859-1 if all their characters are
# representable in it, otherwise in UTF-8.
set sendcharsets=iso-8859-1,utf-8
set [email protected]
set smtp=smtp.qq.com:25
set [email protected]
set smtp-auth-password=xxx


4、启动sendmail服务

# service sendmail restart


5.  测试

#echo test | mail -s  aaa   [email protected]

格式说明:

语法:echo '内容' | mail -s “主题”用户名@地址

例如:

echo “text” | mail -s “program” user 


6、登陆收件箱

wKiom1Xv95GwUdOOAABm6FwokOw397.jpg


你可能感兴趣的:(第三方,otherwise)