I'm really struggling with this error :
Swift_TransportException in AbstractSmtpTransport.php line 404: Connection to tcp://smtp.mail.yahoo.com:465 Timed Out
I hope someone can shed some light on this.
Here are my settings in my .env
file
MAIL_DRIVER=smtp MAIL_HOST=smtp.mail.yahoo.com MAIL_PORT=465 [email protected] MAIL_PASSWORD=******
I notice in /config/mail.php
, I see
'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.
With Laravel 6.x ,7.x and 8.x
it is advisable to use SSL over the default tls.
Most shared hosting providers sign emails with SSL so edit your .env file to have this
MAIL_ENCRYPTION=ssl
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