I saw the bellow settings for .env
in answers on similar questions:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=somePassword1234
MAIL_ENCRYPTION=tls
However, nothing works. With, tls
encryption, I got error
stream_socket_enable_crypto(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:
ssl3_get_server_certificate:certificate verify failed
With ssl
encryption, I got error:
Swift_TransportException
Expected response code 220 but got code "", with message ""
Editor's note: disabling SSL verification has security implications. Without verification of the authenticity of SSL/HTTPS connections, a malicious attacker can impersonate a trusted endpoint such as Gmail, and you'll be vulnerable to a Man-in-the-Middle Attack.
Be sure you fully understand the security issues before using this as a solution.
You must disable signing the letter with a certificate in config mail file: mail.php
return [
....
'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],
....
];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With