Rate limit the sending of messages in phpList

In this article we’ll discuss how you can rate limit how quickly phpList will attempt to send out your messages.

This is important because by default phpList will attempt to send mail out as quickly as it can all at once. On our shared servers there is a default outbound mailing limit of 250 messages per hour, so if you had a list of 500 users, the first 250 would deliver without issue, but the second 250 would not.

If you do have very large lists setup in phpList, you do have the option to fill out our bulk mailing information request form to increase your hourly limit for outgoing mail. However it’s always still desirable to rate limit your sending of messages so that you’re not causing an excessive amount of usage on the server from it having to handle so many deliveries at once.

Enable rate limiting in phpList

  1. Login to your cPanel
  2. click on file managerUnder the Files section, click on File Manager.
  3. select your document root then click goIn the top right-hand corner, click on Settings. Select the Document Root for option, then select the domain you have phpList installed on from the drop-down, then click Save
  4. click on phpList config directoryFrom the left hand pane, expand your public_html directory, as well as the list one, then click on the config directory.
  5. right click on config.php file then click code editRight click on your config.php file, then click on Code Edit from the drop-down.If there is an encoding check pop-up that displays, simply click on Edit.
  6. Now we will setup phpList so that it sends its messages rate-limited, instead of all at once. You need to modify the MAILQUEUE_THROTTLE setting in order to accomplish this.MAILQUEUE_THROTTLE = Time to wait (in seconds) between your messages.We need to do a little math to determine what the best value would be for your mailings. In this example, let’s assume that you haven’t requested an increase in your mailing limit so it’s still 250 messages/hour , and you on average send out about 10 emails an hour outside of phpList.3600 = Seconds in an hour

    250 = Email limit per hour

    10 = Emails sent outside of phpList

    240 = Emails an hour phpList can send

    3600 / 240 = 15 (1 message every 15 seconds)

  7. code editor done editing mailqueue throttle settingsYou can use Ctrl-F in your web browser to bring up the find function of the code editor to easily locate the section of code you need to edit.

    Just type in MAILQUEUE_THROTTLE in the search field and then click on find next.

    The line you need to look for should fall around Line: 350 and looks like:

    define('MAILQUEUE_THROTTLE',0);

    Change this to:

    define('MAILQUEUE_THROTTLE',15);

    After making this edit, click on Save Changes at the top right to make this setting active.

    Now if you send a message to one of your lists in phpList, it should be rate limited so that you don’t go over your hourly outgoing mail limit.

  8. fill out email alerts info and click save changesIf you’ve clicked on send a message from the right hand menu, and already filled out your message on the Content tab. I’d recommend also clicking on the Misc tab and filling out the email alerts information prior to sending your message. This way you’ll get an alert when the message starts sending, and when it’s completed.

    In our example we’re going to use the same [email protected] email address that we already created earlier in our article on how to configure general system values in phpList.

    email to alert when sending of this message starts[email protected]
    email to alert when sending of this message has[email protected]

    After filling out the addresses you’d like to be alerted at, click on Save Changes.

  9. select mailing lists to mail then click send message

    Now click on the Lists tab, select the mailing list you want to send your message to, and then click on Send Message to the Selected Mailinglists.

  10. click on process the message queue

    Finally click on process the message queue to actually begin sending your message.

    Please note that once the sending of your message begins, you can’t stop it. If your web browser window times out, you wont be able to access phpList again until the sending completes.

    At this point if you needed to modify anything with your message prior to sending it, you can click on messages from the right hand menu, click on the queued tab, and then click on suspend sending if you needed another message to be processed first. Or you can click on edit to edit the contents of the message that you have queued for delivery before actually sending it out.

    If you did either of these, you can then click on process queue from the main right hand menu to go ahead and start sending the message.

  11. processing mail queue started

    You should see the message you queued begin to be sent. At this point you can go ahead and close your web browser.

    If you don’t see the message process window, the message is still getting sent out. Check your email address that you setup to be alerted when the sending of a message starts, and you should see that it did in fact begin to send.

  12. messages sent out successfully confirmation

    After you’ve received your email alert that the mailing has completed, you can log back into the phpList admin, then click on messages from the right hand menu.

    You should see the count of how many messages were sent out, and the time it took to send them.

You should now know how to rate limit your mailings with phpList so that you can stay within your mailing limits and enjoy a flawless mailing experience!

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

0 thoughts on “Rate limit the sending of messages in phpList

  1. Not being computer savey.  Called my server SUDDENLINK many times for help. They say its our computer. So we give to the Geeks at Best Buy and they say its our server.  We are unable to send out anymore then 10 emails….each is sent 1 at a time but consecutively.  We have 41 customers to send their email invoices each month.  We have to do it in separate days because unable to send each one out.  SOMEONE PLEASE HELP!

    1. I recommend reviewing your email logs for additional clues, errors, or record of the email transmissions.
      Thank you,
      John-Paul

Was this article helpful? Join the conversation!