Your software
My Mautic version is: 6.0.5
My PHP version is: 8.3
My Database type and version is: MariaDB 11.8.3
Current Status
I am currently using the “sync” scheme for sending e-mails directly to my SMTP service as soon as they are generated by the campaigns, and it works just fine.
Objective
I would like to go towards a more professional configuration so that mautic stores messages in doctrine queues and then sends them out at a slower pace using the “messenger:consume email“ cron tasks
Your problem
I tried to follow an older guide on this forum showing how to set up doctrine queues in mautic v5, but it seems I am still missing something out.
This is what I did:
- In mautic UI “Queue Settings”, in the “Queue for e-mail” section, I changed scheme to “doctrine”, and SMTP server hostname to “default”, so that the DSN line below reads “doctrine://default”
- I configured two cron jobs for, if I well understand, sending campaign/segment e-mails to the queue:
* 8-18 1-5 sleep 0 && php bin/console mautic:messages:send -n >> /var/log/mautic/mautic-messages-send.log 2>> /var/log/mautic/mautic-messages-send-error.log
* 8-18 * * 1-5 sleep 0 && php bin/console mautic:broadcasts:send -n >> /var/log/mautic/mautic-broadcasts-send.log 2>> /var/log/mautic/mautic-broadcasts-send-error.log - I configured an additional job to fetch messages from the queue and send them to the SMTP transport:
* 8-18 * * 1-5 sleep 0 && php bin/console messenger:consume email -n --limit=10 --time-limit=30 --memory-limit=128M >> /var/log/mautic/mautic-messenger-consume-email.log 2>> /var/log/mautic/mautic-messenger-consume-email-error.log
But when I try to send a test message from the UI (Queue Settings), it won’t be delivered: it seems it is getting lost somewhere, and I don’t even know if the message ended up in the doctrine queue (should maybe check in the database table?).
By looking at the logs for the cron tasks above I get:
-
$ cat /var/log/mautic/mautic-messages-send.log | tail -n 10
[2026-02-05 15:13:01] Processing message queue
[2026-02-05 15:13:01] Messages sent: 0 -
$ cat /var/log/mautic/mautic-broadcasts-send.log | tail -n 10
[2026-02-05 15:15:02] ±--------±-------±---------+
[2026-02-05 15:15:02] | Channel | # sent | # failed |
[2026-02-05 15:15:02] ±--------±-------±---------+ -
$ cat /var/log/mautic/mautic-messenger-consume-email.log | tail -n 30
-
$ cat /var/log/mautic/mautic-messenger-consume-email-error.log | tail -n 30
[OK] Consuming messages from transport “email”.
// The worker will automatically exit once it has processed 10 messages,
// exceeded 128M of memory, been running for 30s or received a stop signal via
// the messenger:stop-workers command.// Quit the worker with CONTROL-C.
// Re-run the command with a -vv option to see logs about consumed messages.
So no error there, except that, to my surprise, the output “messanger-consume” job was logged in the error log instead of the standard one. It seems the process is terminating with a non-zero status code, maybe because the timeout elapsed without anything to send.
So my question is: what am I missing here?
Any idea?