简体   繁体   English

使用PEAR通过GMail SMTP发送邮件时出现问题

[英]Issue Sending Mail through GMail SMTP Using PEAR

For the past day or two, I have been receiving this error: 在过去的一两天内,我一直收到此错误:

Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (code: -1, response: )]

We just set up a new linux server (running CentOS), and I have all the necessary packages installed, PEAR, SMTP, etc. This is a known working script, and I have never had any issues in the past sending through Gmail. 我们只是建立了一个新的Linux服务器(运行CentOS),并且我已经安装了所有必需的软件包,PEAR,SMTP等。这是一个已知的工作脚本,过去我从未通过Gmail发送过任何问题。 Now to me it seems to be a DNS issue, because I am able to substitute in the IP address, and it will work - intermittently - meaning some of the mail goes through sometimes. 现在对我来说,这似乎是一个DNS问题,因为我可以用IP地址代替它,并且它可以(断断续续地)起作用,这意味着某些邮件有时会通过。 I've disabled SELinux, and even ran it with our firewall off, so I'm kind of at an impasse. 我已经禁用了SELinux,甚至在关闭防火墙的情况下运行了它,所以我有点陷入僵局。 Any suggestions as to what this may be, or what I might be able to do to resolve the issue? 关于这可能是什么,或者我有能力解决该问题的任何建议?

Edit: Rebooted the server and router, and it seems to be going through correctly. 编辑:重新启动服务器和路由器,它似乎正在正确通过。 Although this is good in the short term, it still has me nervous. 尽管从短期来看这是件好事,但我仍然感到紧张。 Has anyone experienced this issue before? 有人遇到过这个问题吗?

根据使用SMTP身份验证时通过PEAR发送HTML消息返回的错误,您需要将Google地址设置为“ ssl://smtp.googlemail.com”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM