Some emails not sending from campaign

My Mautic version is: latest
My PHP version is: 7.4.33
My Database type and version is: MariaDB 10.4

My problem is:
Client has a campaign with emails that ask for missing information from an application. There are 5 possible missing items and they have 5 emails that pull the data into the email for what is missing. Email 1 asks for 1 missing item; email 2 asks for 2 missing items etc. They want the campaign to run EVERY DAY and want a contact that hasn’t responded or fixed the problem to get the SAME email again each subsequent day (against my advice).

The contact is removed from the segment 18 hours after they are added to it. The campaigns are set to allow sending the same email multiple times.

So a lead may have sent their application but may have excluded 3 items. The email lists what is missing. If the recipient has not responded after the first email, the client sends them the SAME email again the next day.

The problem is the first email goes out fine but the second identical email is not going out. Sometimes the lead will send in a couple of documents but will still be missing a couple.So they then get a DIFFERENT email listing what’s missing. Those ARE going out, I assume because it’s a different email and a different campaign.

The contact emails that aren’t going out aren’t even getting updated in terms of their data. Meaning we use the Segment field and a field called Campaign Start Date as our segment filters. Those ARE correct in the field data coming from the API, but the contact’s data is NOT changed when the contact is added through the API. So they don’t get added to the segment or campaign and hence don’t get sent.

I cannot figure out why contacts data is not getting updated, but I assume because the data is NOT changing on contacts that did not respond (meaning their segment and campaign start date are the same because it needs to trigger the same email).

The client controls and sends the list of contacts through the API. I have no control over who’s included in the lists AND, sometimes the list is triggered inside of 24 hours depending on how their internal system works.

These errors are showing in the log:
I’m not finding errors in the logs relevant to this

Steps I have tried to fix the problem:
I’ve completely recreated the emails, the segments and the campaigns, but same issue.

Any help or confirmation that is indeed a case of trying to send the same email again too quickly.

Chris Blair

Wanted to simplify this in hopes of someone having some feedback.

Basic problem is that Mautic doesn’t seem to be allowing my client to send the same email on consecutive days. Contacts are added/updated through the API. First email goes out, campaign removes them from the segment 18 hours later, contact is then updated through the API, but the segment doesn’t update and they are not added back into the campaign. SOMETIMES…the contact’s filter data DOES NOT CHANGE. Meaning their segment and campaign start date (our 2 filters) are the same, indicating the contact should get the same email again.

I can’t control the timing of the contact udpates as it’s run by my client, so it’s possible they are being updated before 24 hours passes. My theory is Mautic won’t allow sending of the same email inside of 24 hours. Am I on the right track?

Chris Blair


so I think when you remove the contact from the segment it wont be in that campaign or segment anymore even the condition is met.

I would approach it as follows:

  • create a segment where all the contacts that do not have item 1 (field) filled out go
  • set the campaign that sends the email everyday for this segment

once the contact actually fills out the item (via mautic form) system will update the field and remove them from the segment once.

I do not totally understand why you update contact segment field and campaign start date via API.

But the core issue I think lies in the fact that you want to add and remove to segments explicitly. As far as I can tell you can send the same email everyday (looking at the GUI).

Regards, M.

Thanks for the suggestions and info! Some clarifications. The contacts aren’t filling out Mautic or web-based forms. My client creates and sends the lists based on contact behavior that they monitor via their own internal applications. That’s why they are sent and updated via the API. Otherwise, I’d have to upload a CSV file manually each day. So the lists are generated by financial software daily.

Example: If the client receives a document or documents requested in the first email from the contact, they adjust which email the contact should get next. I’m essentially not involved in that process and contact decisions/actions aren’t monitored by Mautic (because the client has their own internal financial software that does all that).

So I’m not able to build typical Mautic campaigns that respond based on a contact’s behavior or actions. It’s a LONG story why the client operates this way. Most of it is because they use multiple financial applications throughout their system and integrating them all with Mautic was just not something they were willing to consider.

So they only way we’ve been able to send the same email more than once is to:

  1. Add the contact to a segment based on field filters
  2. This adds them to the campaign and the email is sent.
  3. Schedule to remove them from the segment a day or two later (or in this case in 18 hours)
  4. Next the contact’s segment filters get updated via the API
  5. They re-enter the segment and campaign and get sent the email again.

This process has worked across multiple campaigns prior to this one so we’re not sure why it’s not working on this one.

Hopefully that makes sense.

Hi, thanks that makes more sense.

I mean one possible solution (workaround) would be to call api endpoint to send email message. So you do not deal with the campaigns anymore but you send individual emails.

But this feels like it should be doable with your approach as well. So my next question is, why do you remove the contact from the segment (“Schedule to remove them from the segment a day or two later (or in this case in 18 hours)”)?

Just leave them on the segment and set the campaign to send email every 18 hours. What am I missing here? Thanks.

Regards, M.

Again, THANK YOU for taking time to help!!! Much appreciated.

And yes that is how I would logically build it, except sending the next email (whether it’s the same email or a different one) depends on how the client responds, and they control the data that determines that. Contact behavior is almost entirely detached from Mautic. So:

  1. if they DO NOT read the email, they get the SAME email again.
  2. If the contact reads the email but does not send the documents my client requests, they get the SAME email again.
  3. If they read the email AND send in SOME of the documents needed, they get a different email asking for the still missing documents.
  4. If they read the email AND send in ALL documents needed, they get the next email in the loan process.

So the next email they get is based on if and how they respond, and ALL of that is controlled by the client’s financial software, which spits out a database file each day that is sent to Mautic via API every 24 hours.

Believe me, I love the work this client gives us but trying to make their campaigns work has been a HUGE challenge when the contact behaviour is completely detached from Mautic.

Hi @chrisb_hallcomm ,

thank you. Let me take next guess here: they do not want to store the actual data fields in mautic since the data is sensitive :). I can understand that.

I still have a suggestion :slight_smile: not sure if that would work, but just bear with me.

What if instead of segment and campaign start date you add/remove tags to contacts.

Lets say we have tags representing different emails that your clients get. Tags: MISSING_ALL_DOCS, MISSING_SOME_DOCS, NEXT_LOAN_STAGE

Now instead sending campaign start date and segment to the Mautic api you send those tags. You are already calling the api which makes me believe that there is a script somewhere that reads the file and adjusts the format so its suitable for Mautic call. Before you actually make api call you just make correct mapping (Segment, Campaign) → Mautic tag and thats it (if you need help with adjusting the api call, I can lend a hand :slight_smile: ).

Come to think of it, for this purpose it might be better to use Mautic stages instead of tags, but I guess does not really matter.

Of course you have to adjust the campaign logic and test it, but I guess do not need to tell you that.

Regards, M.

That’s a great idea and in fact we were using tags early on in campaigns with this client for a variety of similar circumstances. I can’t remember why we switched to segment filters and stopped using tags.

I’m going to give that a try on this campaign and see if it fixes the problem! Will let you know how it works out.


1 Like