Skip to content
Advertisement

Laravel won’t send anymore mails after testing my job class on prouction using “QUEUE_DRIVER=sync” [closed]

At first, it sends some emails then stopped without giving any errors, I tested tinker and it gives “null” without receiving anything!!

this is my config

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=haith*****@gmail.com
MAIL_PASSWORD=******
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=haith*****@gmail.com
MAIL_FROM_NAME=Mar****

Advertisement

Answer

Finallllyy, i find out that when i open a ssh session at the same time of executing the job , ovh block the connection of email host , so when i test my code instead of opening ssh session to run the comman “php artisan queue:work” , i run it in my controller after the dispatch like that “Artisan::call(‘queue:work’);”

I hope that this help someone!!

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement