Changing how Mautic 5 handles email from send immediately to queue

To debug, I recommend to comment out your cron commands and launch everything directly from terminal.

  1. Make sure the particular email is “published” and date is set to a moment in past:

  1. Make sure your “queue” settings are set to doctrine

  2. run emails generator

php -d memory_limit=-1 ./bin/console mautic:broadcasts:send --batch=30 --limit=2000 --id=[YOUR-EMAIL-ID]

in terminal, from mautic working dir (note that you need to get your email id from mautic emails list - this arg helps to isolate sending and debugging for 1 particular campaign)

This will start feeding your queue with generated emails.
If the process exists fast - this means you have a problem with your email generation setup. If it starts working - you will see it, it takes many seconds.

  1. Run actual email sending (you can start another terminal instance for this):
php ./bin/console messenger:consume email --memory-limit=8280M -vv

So, you need two processes running when you want to send queued email campaign: first one is generating emails and putting it into queue; another one is working on the queue.

If it works from terminal, you can start moving these commands either into crontab or daemon like supervisorctl (my preferred method).