我用gmail发邮件,一切都很正常,但它突然停止了工作.它向我展示了这一点

ErrorException in StreamBuffer.php line 94:

stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

in StreamBuffer.php line 94
at HandleExceptions->handleError('2', 'stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed', 'C:\xampp\htdocs\coparmex\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php', '94', array())
at stream_socket_enable_crypto(resource, true, '9') in StreamBuffer.php line 94
at Swift_Transport_StreamBuffer->startTLS() in EsmtpTransport.php line 313
at Swift_Transport_EsmtpTransport->_doHeloCommand() in AbstractSmtpTransport.php line 118
at Swift_Transport_AbstractSmtpTransport->start() in Mailer.php line 79
at Swift_Mailer->send(object(Swift_Message), array()) in Mailer.php line 385
at Mailer->sendSwiftMessage(object(Swift_Message)) in Mailer.php line 171

And this only happends in my localhost, in the web host works fine. I don't understand what is going on :c

这些是我的Gmail设置

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=gmail
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls

推荐答案

这是您的SSL证书有错误.您试图在没有正确证书的情况下使用SSL连接(加密的安全连接).

That's because you're connecting from localhost, which isn't secure, and that is blocked by the connection. You could avoid that by changing your localhost connection to a SSL based one.

See this link for more details.

Laravel相关问答推荐

Laravel:如何从不断更新的Controller中分页数据

RouteCollection.php 第 219 行中的 MethodNotAllowedHttpException

Laravel 错误ReflectionException-类 App\Http\Kernel 不存在

Laravel API 版本控制文件夹 struct

Carbon现在时间错了

验证规则 required_if 与其他条件(Laravel 5.4)

Laravel:如何通过 id 从集合中删除项目

判断 Laravel 模型表中是否存在列,然后应用条件

从 laravel/blade 中的数组创建逗号分隔列表?

Laravel Auth::attempt() 返回 false

Eager加载:在具有eloquent关系的枢轴上使用`with`

Laravel 5.3 - 将多个文件附加到 Mailables

使用 vue-router 更改路由时中止所有 Axios 请求

条带 api 判断现有卡

如何在 Laravel 4 中使用 SHA1 加密而不是 BCrypt?

如何将 Facebook PHP SDK 与 Laravel 5.4 集成?

使用 Laravel 创建新项目会引发异常

Laravel 5 Carbon 全局语言环境

将图像保存在公共文件夹中,而不是存储 laravel 5

有没有办法让表名自动添加到 Eloquent 查询方法中?