Segment plugin - search for modified version

Hi there (sorry for my english i’m french)

I recently installed phplist 3.2.5 and the segment plugin.
It works great (globally) and is working at sending emails.

However, as we have more than 100 000+ emails in ou list, the segement plugin seems low to filter the all campaign.

Regarding this link (
it seems that @duncanc have a modified version that let the plugin make a selection of subscriber at the start of the campaign and not while sending the campaign (through the canSend() method)

Does someone and even @duncanc could be able to tell where to find this modified version ?

Thanks to all in advance :smile:

@GregMT I can provide the version that you refer to but be aware that it is old, and corresponds to version 2015-03-23. All changes to the plugin since then will not be in that version.

Also, please can you provide some statistics on the sending of the campaign:

  • the number of subscribers in the lists to be sent to
  • the number of subscribers who meet the segment criteria
  • the elapsed time for sending
  • whether you use batch processing, and if so the batch size, period
  • the throttle value

as I would like to understand why the sending might take a lot longer than otherwise.

@duncanc Thanks for your reply

I already noticed the date of the thread mentionned earlier and i was excpecting having to make some custom code to make it work :wink:

For the stats, here it is :

  • numbers of subscriber : ~=270 000
  • numbers who meet the criterias : ~= 30 000
  • time for sending : ~=2 days
  • batch params (launched by cronjob every 10 minutes) :

It seems that each time a batch is launched the script take 300 emails that should be sent, then the plugin only select a few part of them, marking the major part “not sent” (which is normal)

ps : i also notice this in actions/processqueue.php :smile:

$userselection = $msgdata['userselection']; ## @@ needs more work

It seems that this variable should receive an sql query and the result would be included in :

$user_attribute_query = " and listuser.userid in ($user_list)";

But i guess that having a +30 000 userid list, is not the best choice.

Do you think using the array returned by SegmentPlugin::selectionQueryJoins() could help ?

@GregMT There are a few changes to your settings that you should make first. In phplist 3.2.5, subscribers rejected by the plugin do not count towards the batch size. The small number of emails sent in each batch is due to the batch period value.

At the start of each batch phplist looks back to see how many emails were sent in the last 590s, and reduces the batch size by that value. So it will never send exactly 300 emails in each batch and usually a lot less.
This approach doesn’t work well so I recommend setting the batch period to a small value, say 10s.

Also, don’t use domain throttling as it introduces unpredictable delays. If you really do want domain throttling then I don’t think that using the old version of the plugin is going to help.

@duncanc Thanks for your advices
I just changed the config the way you explained and i’m gonna follow this. Thank you.

Glad to know that phplist 3.2.5 do not count rejected subscibers by the plugin.

Howerver, don’t you think that the results (i mean the speed and predictability of which emails are sent) would be better if only targeted subscribers were into the “to send” list ?