Database queue for email in Mautic 5 doesn't work as expected

Your software
My Mautic version is: 5 ( latest from the download page )
My PHP version is: PHP Version 8.1.2-1ubuntu2.20
My Database type and version is: 10.6.18-MariaDB-0ubuntu0.22.04.1
My Doctrine driver: pdo_mysql
My Doctrine database platform (automatically detected): Doctrine\DBAL\Platforms\MariaDb1052Platform

Your problem
I followed this tutorial Email sending in Mautic 5: Cron, Queue and Daemons – Joey Keller to set database queue. However, I couldn’t get it to work. For the context:

  • I’m using AWS SES with pm-pmaas/etailors_amazon_ses ( followed this tutorial ) which works fine
  • When I send a test email from Email Settings it works, but when I send an email from ** Queue Settings** it doesn’t work.
  • When I send an email from a single Contact page it works, but when I send a ** Segment email** it doesn’t work, it just stays pending.

The queue configuration is set as required ( 'messenger_dsn_email' => 'doctrine://default', ), and the bin/console messenger:consume email is running in the background using a system daemon.

I tried to track the problem down, so I stopped the daemon and triggered a new Segment email, I checked messenger_messages table, all emails were there. I started the daemon again and the messages disappeared from the table, but nothing is sent. Unfortunately, the messenger:consume email isn’t logging anything.

As soon as I run this command bin/console mautic:broadcasts:send --limit=50 --batch=20 I get the following:

Mautic Integration Testing 2
 4/4 [============================] 100%

+-------------------------------------+--------+----------+
| Channel                             | # sent | # failed |
+-------------------------------------+--------+----------+
| Email: Mautic Integration Testing 2 | 4      | 0        |
+-------------------------------------+--------+----------+

After the bin/console mautic:broadcasts:send command, all messages get delivered. So, it seems that there is an issue with how the queues are handled. I checked Symphony docs and tried to follow all instructions, but nothing worked.

Note that there is nothing being logged in var/logs and messenger:consume email doesn’ log anything even with the flag -vvv. I tried using it with a daemon, cron job, directly in the command line, but it’s not sending or showing anything, but it does something in the background when it’s triggered since the queue messages disappear from the database table as soon as it’s triggered.

Any help would be appreciated, I’m stuck with this for 2 days and can’t find a solution.

You have 3 key commands in this

2 are for sending the messages to the queue and 1 is for actually sending the queue

For filling the queue:

php bin/console mautic:campaigns:trigger
This will send campaign events into the queue

php bin/console mautic:campaigns:trigger
This will send segmented emails and SMS into the queue

php bin/console messenger:consume email
This will process the queue and actually send the emails and sms

Here is some extra info about the consume command (thanks ChatGPT)

php bin/console messenger:consume email — options (the useful manual)

Syntax (core):
messenger:consume [-l|--limit] [-f|--failure-limit] [-m|--memory-limit] [-t|--time-limit] [--sleep] [-b|--bus] [--queues] [--no-reset] [<receivers>...]

Options you actually use

  • --limit=NUM → process NUM messages then exit (good for cron).

  • --time-limit=SECONDS → run up to SECONDS (finishes current message, then exits).

  • --memory-limit=128M|256M|... → exit if memory exceeds that (prevents slow leaks).

  • --failure-limit=NUM → stop after NUM failed messages (useful when something is broken).

  • --sleep=SECONDS → when queue is empty, wait this long before polling again (CPU-friendly).

  • --queues=NAME1,NAME2 → only consume specific queue(s) if the transport supports it.

  • --bus=BUSNAME → force which bus receives the messages (rare in Mautic setups).

  • --no-reset → don’t reset services after each message (can leak state; only use if you really know why).

Two Mautic-specific “gotchas” (important)

  • If you run messenger:consume from cron, Mautic docs recommend you include at least one of: --memory-limit, --limit, or --time-limit (otherwise it becomes a long-lived process).

  • The receiver name email is just the transport/receiver. For “WhatsApp”, it would be whatever receiver you configured (e.g. whatsapp). Messenger doesn’t care what it sends — it just consumes that receiver.