【发布时间】:2016-06-16 15:19:53
【问题描述】:
我在 drupal 中使用 smtp 发送电子邮件。它工作正常。但突然它停止工作并收到此错误消息 phpmailerException:以下发件人地址失败:在 PHPMailer->SmtpSend()(..\modules\smtp\smtp.phpmailer.inc 的第 731 行)。
其实我用的是gmail smtp,也是用另一个邮箱帐号发送邮件。
这是 gmail 配置: smtp 服务器:smtp.gmail.com 使用 SSL 的安全连接,端口 465
更新:这是我在调试代码时出现的错误: “fsockopen():SSL 操作失败,代码为 1。OpenSSL 错误消息:错误:14090086:SSL 例程:ssl3_get_server_certificate:certificate verify failed”
有人帮忙吗?
【问题讨论】:
-
您使用的是什么版本的 PHPMailer?我建议你阅读the PHPMailer troubleshooting guide。
-
另外,您需要发布您的代码,并显示您的调试输出。
-
Phpmailer 版本为 5.1
-
天哪。那是6岁。更新它,因为它连接到 gmail 的希望很小。
-
另外,在phpmailer中执行此行时会失败 $this->smtp_conn = @fsockopen($host, // 服务器的主机 $port, // 要使用的端口 $errno, // 错误号,如果有 $errstr,// 错误信息,如果有的话 $tval); // 之后放弃? secs 所有参数都正确,但是执行后$this->smtp_conn 值是false