Emails Sending Problem - not sent to all contacts

Your software
My Mautic version is: 5.1.1
My PHP version is: 8.2
My Database type and version is:

Your problem
My problem is: Emails are not sent.
I’m using Amazon SES.
Not being aware that I changed something. Last time it all worked.

I’m trying to send out a segment email to 900 contacts.
"Send Example’ works.
Queue is set to sync, direct sending.
I also tried with doctrine. Same problem: No mails are sent. Instead Mautic tells me that the mails are sent, what is not true!

These errors are showing in the log:
[2024-11-30T07:16:24.951165+00:00] app.ERROR: [MAIL ERROR] Unable to send an email: There are 100 partial failures, check logs for exception reasons . {“hostname”:“mars”,“pid”:2032584}

Steps I have tried to fix the problem:
Changed segment with only 4 contacts. Response: 2 sent, 2 failed.
Yes, two emails are delivered correctly!

Error message:
[2024-11-30T09:25:18.324963+00:00] app.ERROR: [MAIL ERROR] Unable to send an email: There are 2 partial failures, check logs for exception reasons . {“hostname”:“mars”,“pid”:2078706}

Cronjobs according Joey Kelly’s tutorial:
php $MAUTICCONSOLE mautic:campaigns:rebuild --batch-limit=300
php $MAUTICCONSOLE mautic:segment:update --batch-limit=900
php $MAUTICCONSOLE mautic:campaigns:trigger --campaign-limit=50
php $MAUTICCONSOLE mautic:import --limit=5000
php $MAUTICCONSOLE mautic:webhooks:process
php $MAUTICCONSOLE mautic:reports:scheduler
php $MAUTICCONSOLE mautic:broadcast:send --batch=5 --limit=500

Any hint very appreciable.

Many thanks

Christian

After further investigation, I found out that the problem is with Amazon SES.
I changed the Email Configuration settings to my own SMTP server and the mails went through.

This explains also my guess that the error came just of a sudden.

Can it have to do with the limitation of 14 mails per second?

When I’m sending the mails via ‘Send’ button in the email, the progress bar takes approx. 40 sec. for the 900 contacts.

I set up the queue according to the wonderful blogpost from Joey Keller.

The problem was that sending immediately via email “Sent” button, the limit of 14 emails per second of my SES account, was too slow. Mautic was pushing to many emails to the SES and finally Mautic came up with the message, that no email, or only a few were successfully sent.
After setting up the cron job for the queue:
bin/console messenger:consume email --time-limit=50
it worked, and all 900 emails went out.

One question remaining is: Why did sending to a segment with only 4 contacts also dropped two contacts and sent only to two contacts successfully?

Another finding:

Amazon SES shows only 646 sent emails, but Mautic shows 943 sent emails.

It is known, that sending via queue the control over sent emails is not reliable.
Exists a possibility of finding out which are the contacts not receiving the email?

You could setup notification about send mails (positive results)… but you need to have a system that can handle the amount of notifications. I would also not use Mautic for that directly. You then know, which mails where dropped through API limit. As AWS doesn’t know what they dropped - they ignored them cause you sent too fast.

As I used a plugin, thats not controlling send speed, I developed a script:

… which limits the command to max 14 mails and 1-2 sec, and then loops until there is nothing left in the queue. This makes sure you never overload the API.

Many thanks Dirk, so kind!
I’m using the Amazon SES plugin and control the speed according to Joey Keller via cronjob.
Just now, Amazon increased my limit from 14 to 50. This should do it without problems now.

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.