Early access to Amazon SES API Support (14X Faster Sending)

Happy new year (and new decade) everyone! As we understand the release of Mautic 2.16.0 is still a few weeks out, but we wanted to call everybody’s attention to an important feature that we strongly think should make it into the next release. Amazon SES API Support

Currently, the implementation of Amazon SES email gateway in Mautic uses the SMTP protocol to send emails resulting in a send rate of around 60 mails/min (1 email per SMTP connection/sec) at best. As many developers including @escopecz have mentioned, using the SES API to send emails can be much more efficient, with multiple emails being queued in a single HTTP request to the API endpoint.

Most new Amazon SES accounts start off with a rate limit of 14 emails/sec so theoretically this means using the API could enable users using SES to send up to 14x faster (840 mails/min) than now.

Based on this comment by @iurisilvio in the GitHub pull request, [sending with the API] “a lot faster than with spool.” The spike to the very left of the chart shows the send rate using Send immediately with the Amazon SES API patch, rather than Queue using the SMTP method. He sent 35k emails within an hour, rather than the 4k emails/hour that was possible before.

Amazon SES API support for Mautic has been requested since what seems like time immemorial, or at least dating back to GitHub improvement requests filed since 2016. If you send high volumes of email using Mautic, please help out with the testing of the pull request - so this feature can potentially get merged in the next release.

We did a writeup how you can backport the code to 2.15.3 to get early access.
Always remember to make a backup of your Mautic instance first.
Note that you cannot apply the pull request in GitHub directly, since that is for the staging (development) branch. At the link below, we posted a diffs file that has been adapted for the master (stable) branch.

LINK: https://autoize.com/amazon-ses-api-support-in-mautic/

Here is the original pull request (with discussion). Please report any issues or successes there.

1 Like

This is amazing! Thank you very much guys! :slight_smile:
I’ll test it in the next days with one of our clients. And give feedback asap.

I don’t want to be negative, just wondering by this is not included into the official release yet. 2 years in the making, and such a basic function.
Any idea when it will be included?

@joeyk actually, I wouldn’t say it is a “basic” function at all.
If we start dividing functions into “basic” and “advanced” functions it gets really difficult.
There are so many people out there who do NOT send via Amazon SES.
So for them it is not even worth thinking about this function.
But there is still some work to be done on the pull request for this function :wink:
(and I’d love to see it in core as well)



Thanks for your comments.
I see it completely differently and this is why:

  1. Amazon SES is one of the most used third party SMTP service due to its reliability, great reputation management, strict rules AND wast resources to enforce these rules.

  2. Shared VPS servers sometimes block conventional SMTP ports, making it impossible to use them with Mautic. Adding SES API connection would allow more customers to try Mautic. (Just happened to me this week AGAIN)

  3. Almost every competitor product can send via amazon SES API connection. The whole process is so streamlined, that you can start sending emails with a few lines of code. I don’t want to minimize the effort needed to add this option to Mautic, but I would like to understand why is it out of focus. (I can hear core developers raging :slight_smile: )

  4. As I listened to Mauticast guests my initial suspicion was reinforced: Email is the number one channel used by Mautic users. If it is true, it should be the most developed one as well.

  5. Amazon SES is the cheapest option to send email today with 10.000 emails for $1.

  6. We already handle Amazon SNS for bounce/unsubscribe management. It would be logical to complete the circle.

  7. There are tons of feature requests when you check the forums (I even dare to say it is among top 10 most requested feature) regarding Amazon SES API, there are users willing to pay for it.

  8. You can find ready to test versions already back in 2018. 2 years ago. How come it was never included in the core product?


I totally understand you Joey.

We send everything with Amazon SES as well. :slight_smile:
And I think it is the best service. Unbeatable regarding the price.

@joeyk the way things get into the core is by people submitting a pull request, and it being both reviewed by the core team, and tested by the community thoroughly. If it’s a big change, or a big feature, then there often needs to be some discussion about whether it’s the right way to do it - for example whether it will stand the test of scaling and if there are any code standard issues etc.

There also needs to be end-user documentation written for any new features, and it needs to be something that has automated tests written as well, if at all possible. We now also need to factor in compatibility with Mautic 3.0 which is in beta currently.

The majority of the above steps happen by volunteers from the community giving their time - to do code review, provide comments/feedback, test thoroughly, but also to actually lead the release and choose what goes in and what doesn’t.

If a pull request has all the requirements - documentation, two good tests, passes code review, etc, then it’s in a good position to be merged.

I asked on the PR whether this could be considered for inclusion in 2.16.1, but as we’re following semantic versioning and the 2.x version will only be bug fixes going forward (with 3.x being the next feature-based releases) this would be likely to feature in the 3.x series rather than 2.x.

With that in mind, I can see right away that there is no documentation, so it’s not in a state where it could be merged. I believe it would also need to be reviewed for 3.x compatibility. Someone needs to do that, and to write the docs to support the PR before it could be considered for merging.

1 Like

Thx for the great explanation.
When you say: “write the docs to support”
Did you mean this?

Hi @joeyk yes indeed, that’s the contribution guidelines for our (current) documentation repo. We’re in the process of moving to a new platform which is a bit more user friendly but a PR to that repo would suffice! :slight_smile:

We also have https://developer.mautic.org which is more focused on the API and technical documentation.

It depends on the nature of the feature - sometimes there won’t be a need for docs, but with most new features there needs to be an update to the end-user documentation, so that people can understand how to use/configure/implement it.

Hope that all makes sense!

Thank you so much for pointing me in the right direction.
I’ll try to find someone who can help me with that, I really want to push this through. :slight_smile:

1 Like

How do I install this on 2.16.2 / 2.16.3? I tried to follow the article on autoize but no dice. I would love to test this out and get a faster sending speed through mautic.

Help is appreciated!


This feature with aditional enhancments made it’s whay to Mautic 3.1RC which supposed to get released tommorow … we need the help of everyone to test it to gurantee it’s stability before getting released within mautic 3.1.
Also it would be great if somone help us in writing automatic test for it #9092 since not doing so can prevent it from making it’s way to the stable release.

3.1RC is now live - please test! :rocket:

1 Like