【问题标题】:SMTP connect() failed PHPMailer Using MailGun使用 MailGun 的 SMTP 连接()失败 PHPMailer
【发布时间】:2021-01-30 20:24:16
【问题描述】:

我试图用 PHP Mailer 连接我的 MailGun SMTP 详细信息,但它根本不起作用,它会引发如下错误

2020-10-16 09:58:34 SERVER -> CLIENT: 220-server2.dnsboost.com ESMTP Exim 4.93 #2 Fri, 16 Oct 2020 15:28:34 +0530 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
2020-10-16 09:58:34 CLIENT -> SERVER: EHLO website.com
2020-10-16 09:58:34 SERVER -> CLIENT: 250-server2.dnsboost.com Hello website.com [192.154.231.187]250-SIZE 52428800250-8BITMIME250-PIPELINING250-AUTH PLAIN LOGIN250-STARTTLS250 HELP
2020-10-16 09:58:34 CLIENT -> SERVER: STARTTLS
2020-10-16 09:58:34 SERVER -> CLIENT: 220 TLS go ahead
SMTP Error: Could not connect to SMTP host.
2020-10-16 09:58:34 CLIENT -> SERVER: QUIT
2020-10-16 09:58:34
2020-10-16 09:58:34
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
failed

我已经尝试了所有建议的方法来解决这个问题,但都没有奏效!

我使用 SMTP 测试站点测试了凭据,它们工作得非常好,并将测试消息发送到我的收件箱,但是当我尝试将它与 PHPMailer 一起使用时它不起作用...

【问题讨论】:

    标签: php email smtp phpmailer mailgun


    【解决方案1】:

    这个确切的错误是described in the troubleshooting guide,它与错误消息相关联!

    在 SMTP 脚本中,这通常会显示为尝试发送 STARTTLS 命令,紧接着是 QUIT 命令。

    这与凭据无关,与服务器上的 TLS 配置有关。尝试设置$mail->SMTPDebug = 3;,然后您需要按照指南中的说明检查您的 CA 证书包。

    【讨论】:

      猜你喜欢
      • 2014-06-13
      • 2015-08-09
      • 2016-11-10
      • 2014-05-20
      • 1970-01-01
      • 1970-01-01
      • 2015-09-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多