vendredi 17 avril 2020

Connection could not be established with host smtp.mailtrap.io :stream_socket_client(): when using SENDGRID to send mail

I am using send grid mail to send mail in Laravel but when i try to send the email i get following error :

"message": "Connection could not be established with host smtp.mailtrap.io :stream_socket_client(): unable to connect to smtp.mailtrap.io:2525 (Connection refused)", "exception": "Swift_TransportException",

env file:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=XXXX
MAIL_PASSWORD=XXXX
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS = XXXX
MAIL_FROM_NAME = XXXXX

I have run following commands also but the same issue :

php artisan config:clear 
php artisan cache:clear 

Please help to solve out my issue.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire