Sending mail is not working in Laravel. This is my code
MAIL_DRIVER=smtp
MAIL_HOST=mail.example.com
MAIL_PORT=465
MAIL_USERNAME=user@example.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
It is showing error
exception: "Swift_TransportException"
message: "Connection to tcp://mail.example.com:465 Timed Out"
When I replace tls
with ssl
. Mail not sending and no error showing.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2PjBHxd
via IFTTT
I notice in /config/mail.php , I see
RépondreSupprimer'encryption' => env('MAIL_ENCRYPTION', 'tls'),
By updating it to
'encryption' => env('MAIL_ENCRYPTION', 'ssl'),
Now, it is working fine. My email is sending out now.