Duplicate Emails Being Sent to Leads (Same Email Sent 3–4 Times Instantly)

Your software
My Mautic version is: v6.0.6
My PHP version is: 8.2
My Database type and version is: MariaDB v 10.3

Your problem
My problem is:

Hi everyone,

I’m having a serious issue with my Mautic instance — several leads have reported receiving the same email 3 or 4 times instantly.

Here’s the situation:

  • I set up a campaign that includes only one email action (“Send an email”) targeted at a segment.
  • Once the campaign runs, many contacts receive the same email multiple times within seconds.
  • I’ve checked the logs, but there’s no indication of duplicate sends.
  • I’ve also run a database query to verify if the same email record was sent multiple times to any contact — nothing was returned.
  • Our cron jobs seem fine to me, but I’m listing them below in case anyone spots an issue.
  • We’re using Amazon SES for delivery, with a daily quota of 170K emails.

Despite this, the issue keeps happening, and I’m getting multiple complaints from contacts about duplicate emails.

Has anyone experienced this issue before, or can point me in the right direction to troubleshoot it further?

I’d really appreciate any guidance or insight.

Here are our cron jobs:

/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:broadcasts:send --channel=email --limit=200 --batch=100 --quiet >/dev/null 2>&1 */3 7-18 * * 1-5
/opt/plesk/php/8.2/bin/php httpdocs/bin/console messenger:consume email --memory-limit=256M --time-limit=280 --limit=130 */5 7-18 * * 1-5
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:email:fetch */5 * * * *		
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:segment:update --batch-limit=800 20 */2 * * *	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:campaigns:trigger */10 7-18 * * 1-5	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:campaigns:update --batch-limit=250 15,45 * * * *
	

Monitoring up cron jobs

/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:social:monitoring 21,46 * * * *
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:custom-field:create-column 0 0 */15 * 0,6	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:plugins:reload 30 1 */15 * 0,6	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:donotsell:download 0 3 */10 * *	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:max-mind:purge 15 3 */10 * *	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:reports:scheduler 30 9 */10 * 1-5	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:webhooks:process 0 */2 * * *
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:import --limit=1000 */8 * * * *

Reports and clean up cron jobs

/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:maintenance:cleanup --gdpr --days-old=120 Daily (02:00)	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:iplookup:download Daily (02:00)	
/opt/plesk/php/8.2/bin/php httpdocs/bin/console mautic:unusedip:delete Weekly (Sun 01:00)

Note: i have also checked the Default Frequency Rule and it is set to 1 email per day per contact.

These errors are showing in the log:

Steps I have tried to fix the problem:

I have tried tweaking the cron jobs slightly but still same issue.

Thanks in advance for your help!

Hmm, sounds very strange indeed.

  • What do the email stats and reports say? Are the a multiple of what you would expect?
  • Does the number of emails sent in SES relate to the Mautic numbers?
  • Are we sure there is no loop in the campaign?

Also:

  • what are the settings for reentering the campaign?
  • Is the email action set to transactional or marketing?

Thanks for your reply.

  • What do the email stats and reports say? Are the a multiple of what you would expect? Yes when i run a report to check how many emails were sent there is extra numbers. e.g a set a campaign with a segment of 856 contacts and sent emails were 928.

  • Does the number of emails sent in SES relate to the Mautic numbers? checked for the segment mentioned above and it says 928 email sent on amazon ses but the segment had only 856

  • Are we sure there is no loop in the campaign? Yes no loop just a simple campaign with one action (send email) and another action update tags.

  • what are the settings for reentering the campaign? disabled (contact should not reenter the campaign)

  • Is the email action set to transactional or marketing? Marketing

ok then: What are your email queue settings in the configuration???

see attached queues configuration images



Thanks

ok so you are using queuing, which is supposed to be a good thing :slight_smile:
Can you get hold of the full email headers (with Message-ID and the minute they arrived) for one affected user?

i have checked and one affected contact received same email 4 times

times : 10:24 | 10:32 | 10:34 and last 10:42

the message id is not identical.

i am sure i am missing somthing in my cron job that cause this issue.

hope there is a clear documentation about this part (cron job set up properly). done a lot of research most on google are for old versions and don’t reply queues.

Hi. You probably have the problem with “Attempts” setting of the campaign “Send Email” action (where default value is 3) which result total 4 emails (initial 1st send email + 3 extra attempts to send after first time it didn’t succeeded). Try to set it to 0 and check if this still occur. This is not a fix. Its just workaround for your problem.

Thanks for your reply. Nope - i don’t have any attempts and in some email campaign i would set that to 1 instead of 3 and still have 3/4 emails sent to the same contact. i am sure it is to do with cron jobs - still investigating.

Yes, second issue may be a cronjob. I had similar issues in Mautic 4 (I still use it). Problem was in the symfony framework implementation of sending email (swiftmail processing class). I solved it by coding own version of mautic:email:send command which make sure emails are send only once in multi-thread processing environment (multiple process sending emails in same time).
I have not yet used Mautic 5 or 6 yet so not sure if there is still same kind of issue there.
I began migration to Mautic 7 already (as RC version was released), so if this happen to me, I will share here how I solved it. Based on your comment I will probably implement own version of the sending command to make sure multiple process not send same email multiple times in high load multi-thread environment.

Great

Thanks for sharing that with us. I can’t wait to upgrade to version 7 - looks really great.

Looking forward to hearing from you.

Thanks

No swiftmailer in Mautic 5 and higher - so if there was indeed a problem with it (is there GitHub issue?), that problem has to be gone by now :slight_smile: