Slow SMTP to send invoices


I am using the version 5.3.66. It all works great and I am very happy with it. Except it takes a good amount of time to send invoices.

The currently using QUEUE_CONNECTION=sync in the .env file.

Is there another way to improve it without changing the QUEUE_CONNECTION to database (Because it isn’t working for me)

Thank you.


Enabling the queue should help, I’m not aware of any other solutions.


I finally had to time to work on it and I got a bigger problem.

Before I had QUEUE_CONNECTION=sync and the crontab was:
0 4 * * * php /var/www/ninja/artisan config:clear
1 4 * * * php /var/www/ninja/artisan optimize
0 5 * * * php /var/www/ninja/artisan ninja:send-recurring
0 6 * * * php /var/www/ninja/artisan ninja:send-reminders

It was working fine, slow but working.
It would send an invoice when I asked it to send and to the invoices at 5 and 6 am.

Then, I have tried…

QUEUE_CONNECTION=database and the crontab to:
0 4 * * * php /var/www/ninja/artisan config:clear
1 4 * * * php /var/www/ninja/artisan optimize
* * * * * php -d register_argc_argv=On /var/www/artisan schedule:run

I understand the schedule has to run every minute, right? It did run, but also sent the same email multiple times, every minute.

What am I doing wrong here please?

I think you may need to add the queue:work command to run the queue