Throttle Sending Segment Email

Hi. I have been using Mautic 2.14.2 for almost a year and it has been working well. I want to set up a segment email for a larger group of contacts, but I want to schedule the segment email so it only sends out 100 emails per hour on weekdays.

I was looking at the documentation at https://mautic.com/help/emails/ in the Segment Email section is looks like there should be a Schedule to start sending at field and I do not see this in my version. I have a Send and then it lets me put in how many to send in one batch (such as 100 by default), but if the segment has more than 100 pending, it will just process them quickly and attempt to send them all out immediately in batches of 100.

I did a test install of Mautic 2.15.1 on a different hosted server and I am seeing the same things when set up a test segment email.

Is there somewhere else that I need to go to be able to schedule the segment email and to throttle how the emails are sent?

Thank you in advance

I’m also curious abut this, additionally, when you set for example, 30 emails per hour, does it send em in one shot or one per 2 minutes?

That feature is not in open source version.
But open source allow send scheduled segment emails, check docs

You need setup cronjob

php /path/to/mautic/app/console mautic:broadcasts:send

and set Publish at/Unpublish dates

The caveat for this is that the emails must be published and must have a published up date - this is to help prevent any unintentional email broadcasts.

This allow you send segment emails in background on scheduled dates

@kuzmany
Thank you for the reply. I am testing this now.

I set up the cronjob with the “app/console mautic:broadcasts:send --limit=75 --batch=75” and set up the days and times I want it to send such as hourly on weekdays between the hours of 8am and 4pm
(1 8,9,10,11,12,13,14,15,16 * * 1-5).
Then I set a publish start and end date for the segment.

To make sure I understand correctly – Is it true that it will only send out any segment emails during that time frame and only for segments that are within the publish start and end date for contacts in the segment that have not previously received the segment email and send them in batches of 75?

Is it true that if I have a segment with a segment email that is published but has a blank publish start and end date that it will NOT send out the emails in that group unless I go into the segment email and click Send manually - so it will not be triggered by the cronjob?

@kuzmany I set up another test but it did not work like I expected.

I have the following in the cronjob to attempt to send out 10 messages every 15 minutes today (Saturday) between the hours of 8 am and 4 pm.

0,15,30,45 8,9,10,11,12,13,14,15,16 * * 6

/usr/local/bin/php [MY-PATH]/app/console mautic:broadcasts:send --limit=10 --batch=10

I initially put 50 contacts in the segment, but it sent out all of those messages the first time the cronjob ran instead of sending out 10 every 15 minutes.

Then I added another 50 contacts and they all got sent out the next time the cronjob ran.

Do I have something wrong in my cronjob code?

Remove --limit=10 --batch=10 from cronjob.

Input 10 into the Message limit for queue processing textarea found under /s/config/edit#emailconfig.

Save & Close.

1 Like

@MxyzptlkFishStix Thank you for the reply.

I do not see where to get into the email config to change the Message Limit for Queue Processing.

I do not see it in the Gui interface in the Settings and configuration.

When I log into server with SSH I am not seeing the email config file.

Can you please provide me more clarification of where I get to this area?

Also, will this setting limit sending all messages to this amount and frequency?

For example if I manually click to send out segment emails and I have a larger group - for example 150 messages that I want sent at once, if I click to Send will it send out all 150 at once (in groups of 100 by default) or will it do it according to the limit in the file you referenced?

Does this limit just apply to messages that are in queue to go out in background using the cronjob settings?

That’s the URL for the Email Settings section inside of Mautic in your browser.

@MxyzptlkFishStix - Now, I am seeing the area in the web gui with /s/config/edit#emailconfig in the URL path

In Settings - Configuration - Email settings – I had the “How should email be handled?” set to Send Immediately, so the other fields were not showing up. When I change it to Queue, then the other boxes show us such as the Message limit for queue processing.

I still want to make sure I am understanding this limit setting. If I set an amount here, is this the amount limit for every cronjob that would send out broadcasts, etc.?

If I have this area set is it possible to send out immediately for a segment email if I click Send or does it just get processed according to the queue and cronjob?

Yes.
It will be the latter.