【问题标题】:Phpmailer,SMTP,Gmail seetings and connectionPhpmailer,SMTP,Gmail 设置和连接
【发布时间】:2017-04-01 21:08:12
【问题描述】:

我正在做一个发送邮件的项目。我已经下载了phpmailer。 我正在使用 SMTP,所有连接到 Gmail 的代码都很好。而且我还打开了 Gmail 2step 验证。并允许低安全性的应用程序。我仍然“无法连接” 当我指定 ssl 时,错误位于 PHPMailerAutoload.php 中的第 294 行,它引用了套接字参数。 我希望任何人都可以帮助我解决此连接问题以及是否需要任何 Gmail 设置。

【问题讨论】:

  • 请添加您的代码

标签: smtp connection gmail phpmailer


【解决方案1】:

实际上我使用 PHPMailer 发送邮件。并下载了所有需要的东西。 每次我执行时都会出现错误 “stream_socket_client():SSL 操作失败,代码为 1。OpenSSL 错误消息:错误:14090086:”等等。 后来我在这个链接中找到了解决方案 https://github.com/PHPMailer/PHPMailer/issues/368

然后我添加了这个

$mail->smtpConnect( 大批( “ssl” => 数组( “verify_peer” => 假, "verify_peer_name" => 假, "allow_self_signed" => 是的

)));

我的邮件中的代码发送 php 文件,最后它工作了.. 希望你明白... :)

【讨论】:

    猜你喜欢
    • 2017-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多