HostGator.com » Support Portal

How to throttle outgoing email with PHPList

HostGator's email policy states that shared and reseller customers should only sending out a maximum of 500 emails per hour. You can view this email policy at the following URL. http://www.hostgator.com/mailpolicy.shtml.

This article contains specific instructions on how you can tweak the mailing list program, PHPList, to abide by the HostGator mailing list policy and send under 500 emails per hour. PHPList is available for automatic install through Fantastico, which is located in your cPanel.

How to throttle PHPList:

  1. The first step is to locate the configuration file for your phplist installation. If you have installed the script on your domain in a location such as http://www.domain.com/list/, then the physical path will be:

    /home/username/public_html/list/config/config.php

    In FTP you could see:

    /public_html/list/config/config.php

  2. Download this file to your local PC or edit the file with your file manager in cPanel. If you download this file to your PC, you should use a program such as notepad or wordpad.
  3. Locate the section of code in this file called "batch processing".
  4. Just below "batch processing", you will see some code as in the following example:

    Code:
    # define the amount of emails you want to send per period. If 0, batch processing
    # is disabled and messages are sent out as fast as possible
    define("MAILQUEUE_BATCH_SIZE",0);

    # define the length of one batch processing period, in seconds (3600 is an hour)
    define("MAILQUEUE_BATCH_PERIOD",3600);

    # to avoid overloading the server that sends your email, you can add a little delay
    # between messages that will spread the load of sending
    # you will need to find a good value for your own server
    # value is in seconds (or you can play with the autothrottle below)
    define('MAILQUEUE_THROTTLE',0);

    These are the default settings. We will be replacing those to keep the mails under 500/hour.

    Here is the code I suggest:

    Code:
    # define the amount of emails you want to send per period. If 0, batch processing
    # is disabled and messages are sent out as fast as possible
    define("MAILQUEUE_BATCH_SIZE",0);

    # define the length of one batch processing period, in seconds (3600 is an hour)
    define("MAILQUEUE_BATCH_PERIOD",3600);

    # to avoid overloading the server that sends your email, you can add a little delay
    # between messages that will spread the load of sending
    # you will need to find a good value for your own server
    # value is in seconds (or you can play with the autothrottle below)
    define('MAILQUEUE_THROTTLE',8);

    These settings allows PHPList to throttle 450 mails per hour, exactly as our TOS suggests. The remaining 50 emails per domain remain available for normal mailing operations.

  5. Save the file and, if downloaded, FTP it back to it's original location. Please, remember to take a backup of the original file just in case you mess up.

Now you should be able to send mails without any bounces and not overloading the mailserver.


Article Comments

Vidov
Thanks for this article. it's helped me when i configured my phplist installation.

Allteb
Thanks very much

John
Did this and set throttle to 2 second delay between msgs. I had to keep manually starting the queue for each batch. Cron jobs appeared to be set right (right command, every 15 minutes). Does the throttle mess up cron jobs?

HostGator
This article does not mention setting a 2 second delay between messages.

Please set the batch size to 0, the batch period to 3600 seconds, and the throttle to 8 seconds delay between messages.

The cron job should then run every hour.

Kyler
Does this article imply that the Hostgator account standard limit per domain is 500 emails per hour? I have a customer on my reseller hosting who would like me to facilitate a periodic mass mailing numbering pehaps into the hundred thousands of recipients. The purpose is a legitimate political campaign, but I'm wondering about server and script limitations. If I cannot do this with my Aluminum hosting, wha Hostgator service would I need to use?

HostGator
Yes, we do limit outgoing emails to 500 per hour per domain.

Also, we only allow mailing lists under 5000 members on shared and reseller hosting.

Any list between 900 and 5,000 members must be sent during off peak hours.

Any list larger than 5,000 members may only be sent from a VPS or dedicated server.

Please read the details in section 3 of our Terms of Service regarding the mail policy. http://www.hostgator.com/mailpolicy.html

George
so it should be like this?
]
# define the amount of emails you want to send per period. If 0, batch processing
# is disabled and messages are sent out as fast as possible
define("MAILQUEUE_BATCH_SIZE",420);

# define the length of one batch processing period, in seconds (3600 is an hour)
define("MAILQUEUE_BATCH_PERIOD",3600);

# to avoid overloading the server that sends your email, you can add a little delay
# between messages that will spread the load of sending
# you will need to find a good value for your own server
# value is in seconds (or you can play with the autothrottle below)
define('MAILQUEUE_THROTTLE',7);

HostGator
Looks great!

The MAILQUEUE_BATCH_SIZE can be any number less than or equal to 500. This prevents your 7 second delay from sending over 500 per hour.

The MAILQUEUE_THROTTLE should be no less than 7, which allows up to 514 emails per hour. (Every 8 seconds would limit me to 450 emails per hour. Every 9 seconds would limit me to 400 emails per hour. Every 10 seconds would limit me to 360 emails per hour.)

The MAILQUEUE_BATCH_PERIOD must be 3600.

***************************************

UPDATE - phpList recommends adjusting either the Batch Size or Throttle, but not both! Setting both can have adverse effects. Set one or the other, but not both.

ahmed
i have 22.000 emails , but i want to add them in phplist

how i can Benefit from This number of emails And Send our messages to them

by using phplist !

HostGator
First, you may only have mailing lists totaling 5,000 members or more on a VPS or dedicated server.

On a VPS or dedicated, it is still a good idea to throttle your emails as much as possible. This will help prevent unplanned server crashes.

Heleen
does a message with one distination address (To:) and many BCC addresses cosidered as one message or more?

HostGator
It counts as many. (Each destination address counts as one.)

Francesco
Is there a script for mailman or what can be done to set-up the same 500 limit throttle on mailman?

HostGator
I don't have a way for you to throttle with Mailman. Just use phpList.

Pete Clark
>Any list between 900 and 5,000 members must be sent during off peak hours.

What are "off peak" hours - including time zone, please.

HostGator
You don't have to take my word for it. You can find this specific information at http://www.hostgator.com/mailpolicy.shtml under Mailing Lists Rules #2.

Charles Smith
Question: Do internal emails sent from my domain to my domain count against the 500 email per hour limit? ex: this@blah.com to that@blah.com

HostGator
Yes, even writing from this@blah.com to this@blah.com uses our mail service, Exim. These count towards the 500 per hour limit.

Ruben
Great posts, thanks Hostgator!

So if someone has 22.000 emails like @ahmed ... can you have them in several lists and send messages to each list in a different day?

For example:
List #1 3000 members send messages (during off-peak hours) on Monday
List #2 3000 members send messages (during off-peak hours) on Tuesday
List #3 3000 members send messages (during off-peak hours) on Wednesday
List #4 3000 members send messages (during off-peak hours) on Thursday
List #5 3000 members send messages (during off-peak hours) on Friday
List #6 3500 members, send messages on Saturday
List #7 3500 members, send messages on Sunday

HostGator
No, never do that on a shared server.

Please carefully read the Mail Policy again. It says "Any mailing list larger than 5,000 addresses will require a dedicated server or VPS hosting solution from us. Note: Dividing one large list into smaller lists to get below this limit is not allowed."

Mike Goldy
If I have a vps or dedicated server how many can I send an hour?

HostGator
Dedicated and VPS can send unlimited emails per hour, and are not required to throttle.

George Kouzis
I am on a shared account and have several sites online and several customers wanting to send newsletters. Only one of my customer has a list of more than 30.000 emails. Others have mailing list of 3.000, 5.000 etc.

Moving to a VPS account needs a lot of work ( transfer files, databases, settings etc etc ).. is there an alternative ?

1. Maybe pay something extra and be able to process large lists ?

2. Move only phplist to a VPS account and keep the rest on the shared account but NOT pay for both shared and VPS accounts monthly ?

3. other ideas welcome...

Lists of 5.000 addresses is really very limiting !

Lets say that I have only one list of 5.000 addresses and I want to send them an email daily... this is allowed ! But to process a larger list monthly is not permitted ???

Please advise...

HostGator
1. No, the large email lists cause high server load and use the resources other shared accounts need.

2. This would work, but you would have to pay for both accounts.

3. I suggest you move your entire account to a new VPS, and then request the free unlimited content transfers we offer with that upgrade. HostGator will transfer your files, databases, and help you configure the same environment. We can also advise you on updating database configuration files if needed.

George
I have a 3000 mail list in my newsletter and I send it twice a week. Would this count as 2x3000? Should there be a mandatory gap between the two newsletters?

HostGator
That still counts as one list of 3000, so you can stay on a shared server, but must follow the other rules.

You must throttle the list, and you may only send during off-peak hours.

Sami
i have 10000 emails
can 5000 in first week and 5000 in second week ?

HostGator
No, you cannot do that.

Any mailing lists you use count as one total, and if the total is 5000 or more, then you must host on a VPS or dedicated server.

Victor
If I have a VPS hosting account, can I install a follow up autoresponder?

How many addresses can I have in my mailing list?

If I have 50,000 addresses in my mailing list on a VPS account, can I send a broadcast to all of them at the same time and at any time?

Thanks for the advise...

HostGator
Sure, you can host an auto-responder site or service.

There is no limit to the number of addresses you may have in your mailing list when on VPS or dedicated.

You can send as many emails as you want at any time on VPS or dedicated. However, if you send large amounts of emails at once, you risk crashing your VPS container or dedicated server. That is why we recommend throttling.

Prabhu
well i am into SEO, our main marketing structure is only sending bulk emails, i understood that 500 mails should be sent per hour, i have around 20 million email id's , can i send every hour 400 mails ? is that permitted ? or what should i do for sending regular mails

HostGator
Sounds like you are asking because you want to save some outgoing emails each hour for regular emailing.

You would be required to go to VPS or dedicated because your mailing list is over 5000 id's. On the VPS or dedicated server, you aren't limited to 500 outgoing emails per hour, so there is no problem anymore.

Twenty million emails at 400 per hour would take you almost 6 years to complete the mailing list. I would not recommend that.

Angel
As you said HostGator
Dedicated and VPS can send unlimited emails per hour, and are not required to throttle.

--------------------------------------------------------------------------------
How much it will cost a Dedicated and VPS with HostGator? thanks

HostGator
Please consult our website for that information.

http://www.hostgator.com/vps-hosting/

http://www.hostgator.com/dedicated.shtml

Billy
So you say the Cron job should be setup for every hour, but shouldn't it run 1 time and then stop when done if I add a cron job to run a a specific time. If the cron is setup every hour then its runs all the time. Even when a newsletter does not need to be sent. Can you clarify this ?

gimme
You run every hour cause the MAILQUEUE_BATCH_PERIOD = 3600 seconds.

Marcus
My settings are:
define("MAILQUEUE_BATCH_SIZE",0);
define("MAILQUEUE_BATCH_PERIOD",3600);
define('MAILQUEUE_THROTTLE',10);
and Cron Jobs script running every 15 minutes.

Shouldn't this send 360 messages / hour?

HostGator
Would work maybe if your MAILQUEUE_BATCH_PERIOD = 900 or if you make the cron run every hour.

However, I recommend you use the same settings as the article.

HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.

Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.

Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.



Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment