【问题标题】:Mandrill SMTP - API 110 : Connection timed out ERROR with PHPMailerMandrill SMTP - API 110:PHPMailer 连接超时错误
【发布时间】:2014-03-12 08:47:05
【问题描述】:

Mandrill SMTP - API 110:PHPMailer 连接超时错误

错误

SMTP -> 错误:无法连接到服务器:连接超时 (110) SMTP 错误:无法连接到 SMTP 主机。 SMTP -> 错误:无法连接到服务器:连接超时 (110) SMTP 错误:无法连接到 SMTP 主机。

示例代码

<?php
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 1;   // enables SMTP debug information (for testing)
$mail->SMTPAuth = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host = "smtp.mandrillapp.com";     // sets GMAIL as the SMTP server
$mail->Port = 465;                   // set the SMTP port for the GMAIL server
$mail->Username = “yourusername”;  // GMAIL username
$mail->Password = “passowrd”;            // GMAIL password
?>

【问题讨论】:

    标签: smtp


    【解决方案1】:

    我们的立场相同。因此,首先是检查您的配置:

    1. $mail->SMTPSecure = "ssl"; // 设置服务器的前缀

    您是否使用任何安全线路?如果没有,你可以删除这个。

    1. $mail->端口 = 465; // 设置 GMAIL 服务器的 SMTP 端口

    您应该检查您正在使用的端口是否真的是打算使用的端口。 More information about Mandrill ports here.

    如果上述方法仍然不能解决问题,请检查并联系您的网络托管服务提供商,他们是否允许出站 SMTP 连接,尤其是与 Mandrill 的连接,因为某些提供商只在专用服务器上这样做。更多信息在这里:http://help.mandrill.com/entries/24633717-Why-am-I-getting-a-Relay-Access-Denied-error-trying-to-send-through-SMTP-

    【讨论】:

      猜你喜欢
      • 2014-07-10
      • 2015-06-12
      • 1970-01-01
      • 2016-10-26
      • 1970-01-01
      • 2015-01-22
      • 2017-10-15
      • 1970-01-01
      • 2014-02-16
      相关资源
      最近更新 更多