当前位置:   article > 正文

解决测试 centos 邮件发送失败问题_centos下mail无法发送

centos下mail无法发送

yum install mailx -y 

vim /etc/mail.rc  #末尾添加发送者邮件地址

set from=xxxxx@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=xxxxx@qq.com
set smtp-auth-password=邮箱密码
set smtp-auth=login

systemctl restart postfix.service  #重启服务

#测试发送信息

echo "hello world" | mail -s "testmail"  xxxxxxxx@139.com

[root@bogon ~]# echo "hello world" | mail -s "testmailsmtp-server: 535 Error: ȫʹԃ˚ȨëµȂ¼¡£Ъȩȫ¿´: http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256
"/root/dead.letter" 11/305
. . . message not sent.
#信息发送失败 

#解决方法

vim /etc/mail.rc  #末尾添加发送者邮件地址

set from=xxxxx@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=xxxxx@qq.com
set smtp-auth-password=邮箱密码     # 邮箱密码使用SMTP授权码
set smtp-auth=login

systemctl restart postfix.service  #重启服务

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/262748
推荐阅读
相关标签
  

闽ICP备14008679号