Broadcast email batch

I did search on this and there was one unanswered post from several years ago so I am posting this in hope someone know the answer now.

I am set up with Amazon SES which allow me to send 14 emails per second.

After reading on Mautic cron jobs “mautic:broadcasts:send”, I am not sure what parameter to use for 14 emails per second. The --limit=X or --batch=X

How is it set up for 14 email per second? I am guessing that it’s under “batch” and set cron job to run every minute then 14 email per second is 840 per minutes?

(Every minute cron job) php /path/to/mautic/bin/console mautic:broadcasts:send --batch=840

Correct? If not, what the correct way to set this up?

Thank you!

First of all, this only works for non-queue setup.

You plan to launch this command every minute:
php /path/to/mautic/bin/console mautic:broadcasts:send --batch=840

What you expect would happen is:
Mautic will start sending emails as fast as possible, and stop after 840 emails are sent. After one minute it will do it again.

What will most likely happen:
The command is executed and you start sending up to 840 emails. It will take you 7 minutes to complete because you will send with 2 email / second. This is how fast your server can send. Even if you want it to send faster. By minute 2 the second thread starts, you might even send out duplicates, but not for sure. Anyway, in minute 2 you are sending with 4 emails / second. In minute 7 you are sending 14 emails / sec. In minute 8 the first thread is over, so you are sending with 14 sec / minute. Are you sending duplicates? Very much possible. Thread 2 doesn’t know that he has to start from email 120… But you need to test it.

What also can happen:
Your sending speed is 5 email / second, thread 1 will be sending out 360 emails already when thread 2 starts. When thread 3 starts you have already sent 720 emails. But at this point your sending speed is 6+6+6, which is over Amazon’s limit (18). Amazon will throttle your sending or shut it down.

What also may happen:
Your sending speed is 20 emails / second because you have a super powerful server. Your first batch will run for 5 second and amazon shuts you down for too fast sending.

Is there a proper way to set it up to make Amazon happy?

From my understanding is that I can only send 14 email per second (I think if I understood Amazon rules correctly) so I am not sure how do I set it up property that it follow Amazon’s sending rules

I don’t want to get shut down for sure …

Do I even need mautic:broadcasts:send if I am using Amazon SES API?

I managed to get Amazon SES API setup even with the bounce and complain notification working on Mautic using the Amazon SES API in the email configuration … So far works good but I only send a few practice emails … Even the practice amazon bounce and complaint emails that get marked property by Mautic.

How is sending speed throttled using Mautic Amazon API plugin? WIll it send email that it doesn’t get Amazon to suspend me or is that adjustable anywhere in configuration menu?

Thank you

After switching over to Amazon API in email configuration setting … What about the queue setting? 14 message for every 1 second? Is that how it done?

The sending speed is not throttled in a classical sense. Mautic will always send maximum speed.
You can run your cron every minute and set how much you send per minute.
If you send less then 840 / minute, you should be fine, but check what I wrote before.
Just to make a test, go into your ssh and:

  1. turn off cron
  2. create your email in Mautic and send it. At least to 28 addresses
  3. run the command manually, and see how long it takes to execute.
    If your 28 emails are sent within less then 2 sec, then you will have issue with too fast sending
    If your 28 emails are sent within 5 seconds, you will need have to make sure, that your max send / execution is the amount you can actually manage within one minute. You don’t want a second thread to catch up with your first thread. (see above)