I’m currently having the same trouble as you, with a couple of differences, being: I installed version 4 of Mautic using Mautic’s official image; I use a self-hosted MySQL server on a different server and connected it to my Mautic using environment variables; I use Amazon SES for my email service.
I have configured my Mautic to enable more than one email to be sent to every contact in the “Default Frequency Rule” and I’ve also set the email sending scheme to use Queue in the “Mail Send Settings” configuration.
I confirmed that the container’s crontab is non-existent by docker exec-ing into the container and running crontab -e. I checked that the cron jobs are also defined in /etc/cron.d/mautic.
I also confirmed that the installation is not faulty because I sent a couple of emails using the “Send Immediately” option for the “Mail Send Settings” and the emails did get sent out.
I can confidently say that the problem stems from the cron job because after setting the “Mail Send Settings” to queue and I tried sending a couple of emails, the emails are created and stored in the var/spool/ directory in the form of file_name.message files inside the container. The problem is that they’re not getting sent out.
I tried manually running php /var/www/html/bin/console mautic:emails:send from the /var/www/html directory and nothing happened, the emails are still intact in the var/spool/ directory.
I’m curious, have you figured out a solution to this problem? If you have, do you mind sharing your solution?
So after a week of tinkering, I found the problem.
The problem is in one of the cron command in the /etc/cron.d/mautic file. According to this post in Mautic’s github repo, the @reboot command doesn’t seem to work. Why? Frankly I haven’t done my research as to why. But after removing that line and adding news lines after every command, my cron works. Here is the complete cron commands:
For those reading this, I just found that the cron service was not running on my docker container. I just manually started it and added that definition to my Dockerfile. Let’s see how that works.