I have two mailable clasess: Notification and UserRegister
On develop environment both work fine
On production environment only Notification works properly.
In this case, UserRegister works if it's sent directly but not when queued. It tries till 255 attempts are reached and then it stops.
Mail::to($address)->send(new UserRegister($user)); // works fine Mail::to($address)->queue(new UserRegister($user)); //it doesn*t work. Always on queue Mail::to($address)->later($when,new UserRegister($user)); //it doesn*t work. Always on queue
I have cleared all caches in production. I have executed "composer dump-autoload".
My .env parameter for queue is database on both environments:
QUEUE_DRIVER=database
- I have restarted the production server
- There could be something wrong on my supervisor configuration?
- No idea what else I should do
Thanks for any help