【问题标题】:PHPMailler with mandrill smtp gives connection error带有 mandrill smtp 的 PHPMailer 给出连接错误
【发布时间】:2015-06-12 05:58:54
【问题描述】:

我通过 PHPMailer 在我的网站上使用 mandrill 的 smtp。我已经正确配置了一切。以下是配置-

$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "smtp.mandrillapp.com"; // SMTP server
$mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                                           // 1 = errors and messages
                                           // 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->Host       = "smtp.mandrillapp.com"; // sets the SMTP server
$mail->Port       = 587;                    // set the SMTP port for the GMAIL server
$mail->Username   = "MANDRILL_USERNAME"; // SMTP account username
$mail->Password   = "MANDRILL_KEY";

当我发送电子邮件时,它给出了错误SMTP -> ERROR: Failed to connect to server: Connection refused (111)

我正在使用 godaddy 共享主机计划。 请帮忙。

【问题讨论】:

  • 您可能希望根据需要更改端口 - Check this out - 请务必确认
  • 我已经检查了端口 25,但仍然无法正常工作。尝试使用 ssl 类型加密的端口 465,但效果不佳

标签: php email smtp mandrill


【解决方案1】:

某些共享主机提供商会阻止所有出站 SMTP 连接或常用 SMTP 端口。您需要联系 GoDaddy 以确认您的计划是否支持出站 SMTP 连接(您通常需要更高级别或 VPS 计划来支持大多数共享主机)。

【讨论】:

  • 我相信这就是原因。非常感谢。
猜你喜欢
  • 2014-02-16
  • 1970-01-01
  • 1970-01-01
  • 2017-10-15
  • 2017-01-19
  • 1970-01-01
  • 1970-01-01
  • 2017-07-03
  • 1970-01-01
相关资源
最近更新 更多