【问题标题】:Configuration to be done in cpanel php mailer Could not connect to SMTP host要在 cpanel php mailer 中完成的配置无法连接到 SMTP 主机
【发布时间】:2012-04-12 21:52:47
【问题描述】:

邮件功能在我的本地主机上运行良好,但是当我将代码上传到服务器 cpanel 时,它会抛出以下错误

SMTP -> ERROR: Failed to connect to server: Connection refused (111)
SMTP Error: Could not connect to SMTP host.

如果我远程登录我的域服务器

220-xxxxx.xxxxxxxxxx.com ESMTP Exim 4.69 #1 Fri, 30 Mar 2012 00:00:13 -050
0
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.

【问题讨论】:

  • 可能是服务器拒绝默认端口 25 上的连接。您检查了吗?试试telnel mailserver 25
  • cpanel中是否有配置需要配置
  • 这取决于托管服务提供商。如果他们关闭了 25 端口,他们肯定打开了 465。你可以使用 sendmail 而不是 SMTP。
  • 你能把echo $this->email->print_debugger();的输出贴出来
  • 如果相同的代码在工作,那么问题很可能出在 cpanel 服务器上。你真的可以发布你的电子邮件配置吗?

标签: php codeigniter cpanel


【解决方案1】:

由于脚本无法在服务器上运行,请检查服务器上的防火墙。

SSH 到服务器和 telnet 到接收域的 mx 记录。

telnet mail.receiver.com 25

【讨论】:

  • Ssh 到服务器...如何在我的 cpanel 中执行...我正在使用 Windows ...并且我的接收器端口已打开
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-05-01
  • 1970-01-01
  • 2016-05-02
  • 2012-05-24
  • 2012-06-17
相关资源
最近更新 更多