Again on cron "bin/console mautic:emails:send"

My Mautic version is: 4.4.5
My PHP version is: 7.4.33
My Database type and version is: MySQL 5.7.39

I have a problem with cron “bin/console mautic:emails:send”.
I’m on Siteground, GoGeek plan, so the server is shared. Using my own SMTP server I can send a maximum of 10 emails per second. However, this check occurs every second, not every minute. That is, if I send more than 10 emails in one second the server stops sending emails. Unfortunately it seems that Mautic/Symfony sends more than 10 emails per second (is it right?). Indeed in the Mautic log files I find “…received more than 10.7 messages for 1s”.
The only way I found to avoid this problem was to run the cron every minute and send 10 queued emails.
But sending 10 emails in one minute isn’t exactly exciting!
I tried to use the “–lock-name=[NAME]” option by running two identical crons with different names, but it doesn’t work because the crons still start at the same time and send emails at the same time.
I’ve read about the possibility of creating a bash, but I find it a bit too complicated for me.

At the moment, my cron is this (and all work fine, but slowly…):
*/1 * * * * php /bin/console mautic:emails:send --message-limit=10 --time-limit=45

Some idea?


1 Like

Thats also important for using Amazon SES… The limit is defined by the second.

How fast are you sending 10 messages now? under 1 sec?

1 Like

Not sure how I can measure it on either Mautic (send) or AWS (receive). Probably my servers are not too fast yet, but I could imagine to hit this limit when using API?

You can just run the command and count the seconds.

1 Like

Hello, joeyk…
I’ve read many af your posts here and some videos on In one of your post I’ve read the possiblity to create a linux job/bash with a random timer… but that solution seems to be too complicated for me… :frowning:
Anyway, in my case my server (SiteGround) send more than 10 emails per second and Mautic, in the “log” folder", creates some big log file (for example “prod-2023-03-31.php” is about 50MB).
Do you think is there some solution for my problem?
Can I do some test?


You can always test how long it takes to send 10 emails:
execute this in the Mautic folder if your spool is not empty:

bin/console mautic:emails:send --message-limit=10

Just count the seconds how long it takes to send the 10 emails.
You can also set this cron which waits between 2 sends and only runs for 60 sec:

bin/console mautic:emails:send --message-limit=10 & sleep 10 & bin/console mautic:emails:send --message-limit=10 & sleep 10 & bin/console mautic:emails:send --message-limit=10

(use the right path)

If you run this command, then you’ll send 10 emails, wait 10 sec, send again, etc.

Let me know.

1 Like