---
title: "Rate limit the sending of messages in phpList"
description: "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..."
url: https://www.inmotionhosting.com/support/edu/phplist/rate-limit-sending/
date: 2013-01-09
modified: 2021-11-19
author: "InMotion Hosting Contributor"
categories: ["phpList", "Website"]
type: post
lang: en
---

# 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](/support/) 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](/support/edu/cpanel/how-to-log-into-cpanel/)
2. [![click on file manager](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_file-manager.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_file-manager.png)Under the **Files** section, click on **File Manager**.
3. [![select your document root then click go](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_file-manager-settings.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_file-manager-settings.png)In 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 directory](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_select-config-folder.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_select-config-folder.png)From 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 edit](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_edit-config-php.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_edit-config-php.png)Right 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 settings](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_code-editor-done-editing-throttle-settings.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_code-editor-done-editing-throttle-settings.png)You 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](/support/edu/phplist/send-a-message-to-a-list-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 changes](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_fill-out-email-alerts-click-save-changes.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_fill-out-email-alerts-click-save-changes.png)If 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 **listreports@PrimaryDomain.com** email address that we already created earlier in our article on [how to configure general system values in phpList](/support/edu/cpanel/complete-phplist-setup-after-softaculous-install/#configure-general-system-values). email to alert when sending of this message starts listreports@PrimaryDomain.com email to alert when sending of this message has listreports@PrimaryDomain.com 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](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_select-lists-to-mail-click-send-message.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_select-lists-to-mail-click-send-message.png) 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](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_click-on-process-message-queue.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_click-on-process-message-queue.png) 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](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_processing-mail-queue-start.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_processing-mail-queue-start.png) 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](https://www.inmotionhosting.com/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_message-sent-successfully.png)](/support/wp-content/uploads/2013/01/edu_phplist_messages_ratelimit_message-sent-successfully.png) 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!
