【问题标题】:SSL routines:tls_process_server_certificate:certificate verify failed in Yii2SSL 例程:tls_process_server_certificate:证书验证在 Yii2 中失败
【发布时间】:2018-09-18 00:14:41
【问题描述】:

前段时间,我可以使用我的 gmail 地址在 yii2 中使用 swift mailer 接收和发送消息。我不记得做过任何更改,但现在我得到了:

SSL 操作失败,代码为 1。OpenSSL 错误消息: 错误:1416F086:SSL 例程:tls_process_server_certificate:证书 验证失败

我的快速邮件设置:

'transport' => [
                'class' => 'Swift_SmtpTransport',
                'host' => 'smtp.gmail.com',
                'username' => 'mymailadress@gmail.com',
                'password' => 'mypassword',
                'port' => '465',
                'encryption' => 'ssl',
                'streamOptions' => [ 
            'ssl' => [ 
                'allow_self_signed' => true,
                'verify_peer' => false,
                'verify_peer_name' => false,

我在前端和后端都更改了adminEmail。 我的谷歌设置很好,访问不太安全的应用程序设置已打开,我启用了 IMAP。我不知道我做错了什么。我尝试使用新的 gmail 或将 swift maileg 配置中的设置更改为 tls。

【问题讨论】:

    标签: ssl yii2 gmail swiftmailer


    【解决方案1】:

    '运输' => [

    'class' => 'Swift_SmtpTransport',

    '主机' => 'smtp.gmail.com',

    '用户名' => '我的邮箱地址',

    '密码' => '我的密码',

    '端口' => 587,

    '加密' => 'tls',

    ],

    尝试使用 tls 代替,用户名无需填写 @gmail.com

    【讨论】:

      猜你喜欢
      • 2021-09-04
      • 2018-12-21
      • 2019-04-08
      • 1970-01-01
      • 2019-12-12
      • 1970-01-01
      • 1970-01-01
      • 2023-01-03
      相关资源
      最近更新 更多