lo pudiste resolver?
Sep 9, 2020
10
Level 1
stream_socket_enable_crypto(): SSL operation failed with code 1 Laravel 7
Hello. I had a problem with sending emails using Google SMTP. I researched how to solve this but I still get the error stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
My declaration in .env file
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=app_code_password
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="${APP_NAME}"
I fix the config/mail.php file
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.gmail.com'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
...
],
I also add this line also on config/mail.php
'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],
Still doesn't work. I used php artisan config:clear many times. I set up my google account already with less secure apps on, activate the 2 step/way verification, and I use the app_code instead of my password.
Please or to participate in this conversation.