Emails getting stuck in the middle of a campaign

Your software
My Mautic version is: 4.0.1
My PHP version is: 7.4.11
My Database type and version is: MariaDB 10.5.12

Your problem
Hi, I’m getting some confusing behavior in Mautic and I’m baffled as to how to troubleshoot it.

I built a campaign selecting contacts from two segments, and before the first email set a rule to “exclude” contacts with a certain tag:

  ┏━━━━━━━━━━━━━━━━━━━━━━┓
  ┃ Segment A, Segment B ┃
  ┗━━━━━━━━━━━━━━━━━━━━━━┛
            ||
            ╲╱ 
  (Wait until a date/time)
  ┏━━━━━━━━━━━━━━━━━━━━━━┓
  ┃ If contact has Tag X ┃
  ┗━━━━━━━━━━━━━━━━━━━━━━┛
    (yes)         (no)
                   ||
                   ╲╱
            ┏━━━━━━━━━━━━━━┓
            ┃ Send Email 1 ┃
            ┗━━━━━━━━━━━━━━┛
                   ||
                   ╲╱
        (Wait until another date)
            ┏━━━━━━━━━━━━━━┓
            ┃ Send Email 2 ┃
            ┗━━━━━━━━━━━━━━┛

…and so on. I have an initial test for tag X to exclude a specific group of contacts, and then schedule daily emails for the rest of the contacts from the initial segments.

My problem is that Mautic sends only Email 1. From 2 onwards it queues the send operation (gray box in email list), but never sends them and they never appear in the spool directory.

Steps I have tried to fix the problem:
If I clone the already queued emails as Broadcast ones and try to schedule them directly using a publish date, they also get queue but never sent. The mautic:broadcasts:send operation lists the broadcast as “pending” for N contacts, but on the next run it lists as 0 pending, as if the emails were actually sent. In the email list they are shown as queued (gray box again), never as sent (yellow box).

I also tried creating a new segment, joining Segments A and B and also excluding Tag X through segment filters, and then creating a campaign to just schedule the emails without the need for a decision block, but the result is the same: all emails get stuck in queued state.

What I’m doing daily as a workaround is copying (not cloning, but manually copying everything) the stuck email for the day and creating ad-hoc campaigns to send each email immediately.

I have a script that runs each of the following operations scheduled every 2 minutes in crontab. It uses flock to keep it from starting if another instance of the script is still running, but it is generally taking ~20 seconds to run if there aren’t any emails to send in the spool.

  mautic:segments:update
  mautic:campaigns:update
  mautic:campaigns:trigger
  mautic:broadcasts:send
  mautic:messages:send
  mautic:emails:send

These errors are showing in the log:
Nothing is written to the Mautic log files when this happens.

Hello,

What happens is, that your contacts reach the maximum emails they can get in one day (possibly 1).
Read this thread to understand more:

1 Like

Thanks for answering and sorry for not finding the the email you pointed to before asking y question.

I set the default frequency to 100 and will check if it works out in next campaign.

A follow-up question: I understand a buggy frequency rule could be the problem when I want to send more than one email a day and the setting is NULL instead of zero (the default?). But if I’m scheduling campaign emails to be sent on different dates, why should this frequency rule apply, even if it’s buggy?

This is a limit per contact. In your settings you set 100 / day, so on a given date the 101st email won’t be sent. Next day the counter restarts.

do we know if this is fixed in 4.0.2 ?