mardi 4 août 2020

Laravel mail error: Connection to tcp://mail.example.com:465 Timed Out

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

1 commentaire:

  1. 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.

    RépondreSupprimer