CentOS 6.6使用sendmail登陆第三方邮件系统发邮件
[*]yum install sendmail
2、停止postfix邮件服务,(系统默认打开,占用25端口)#service postfix stop
3.修改配置文件,添加5行 set 有关内容
#vim /etc/mail.rc
1
2
3
4
5
6
7
# 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 from=xxx@yjunzi.com
set smtp=smtp.qq.com:25
set smtp-auth-user=xxx@yjunzi.com
set smtp-auth-password=xxx
4、启动sendmail服务
# service sendmail restart
5.测试#echo test | mail -saaa xxx@qq.com格式说明:语法:echo '内容' | mail -s “主题”用户名@地址
例如:
echo “text” | mail -s “program” user
6、登陆收件箱
页:
[1]