How to make an efficient mass mailing.
A lot of customer are sharing the same server for hosting their Website. When someone wants to do a mass mailing, it may interfered with the proper operation of the server as well as other sites hosted in it, if everything is not executed properly. That’s why a sending mail limit (number / hour) is set to prevent any slowdown or even complete shutdown of the server. To avoid an incorrect action which may affect websites hosted onto the whole server, there’s an application called PHPList. It can be installed on any Linux hosting as long as a database is available. PHPList also allows you to fill your needs to send a mass amount of emails while respecting the established rules and ensuring the proper functionning of all the sites sharing the same server.
The following are the main reasons why a limit was set for sending email per hour:
• It won’t attire the attention of spammers;
• It will avoid the entire server to be penalized with anti-spam services;
• It will prevent a slowdown in the delivery of legitimate emails;
It is important to check with your host the conditions laid down for sending mass email. Otherwise, your mail may not reach its destination and can be perceived as a spam.
The PHPList application has the ability to send personalized messages, up to 3000 per hour or 5000 non-personalized messages per hours. However, the limits set by your provider are generally lower. Inquire in advance! PHPList offers you two methods to send mass mailing without violating the limits imposed by your host:
• Batch processing of the queue, “Batch processing”;
• Slowing the speed of transmission: “MailQueue throttling”;
Here is the block set in the “config.php” file of the PHPList application.
# batch processing
# batch processing
# if you are on a shared host, it will probably be appreciated if you don’t send
# out loads of emails in one go. To do this, you can configure batch processing.
# Please note, the following two values can be overridden by your ISP by using
# a server wide configuration. So if you notice these values to be different
# in reality, that may be the case
## if you send the queue using your browser, you may want to consider settings like this
## which will send 10 messages and then reload the browser to send the next 10. However, this
## will not restrict the sending to any limits, so there’s a good chance you will
## go over the limits of your ISP
## if you send the queue using commandline, you can set it to something that complies with the
## limits of your ISP, eg 300 messages an hour would be
# and then you need to set the cron to run every 5 minutes
# 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 the length of one batch processing period, in seconds (3600 is an hour)
# Please note: this setting has two consequences:
# 1. it will enforce that the amount of emails sent in the period identified here does not exceed the amount
# set in MAILQUEUE_BATCH_SIZE
# 2. there will be a delay of MAILQUEUE_BATCH_PERIOD when running the queue.
# number 1 is mostly when using commandline queue processing (strongly recommended)
# number 2 is when using browser queue processing. The browser will reload to send the next
# batch after the amount of seconds set here
# 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)
Batch processing queue “Batch processing”
With this method, PHPList allows you to create two sending parameters. Both will work together jointly. This allows you to send “N” emails to every “T” seconds.
• The amount of email to send (N = Number)
• Sending frequency (T = Time)
Here is an example:
N est MAILQUEUE_BATCH_SIZE
T est MAILQUEUE_BATCH_PERIOD
These settings force PHPList to limit and avoid sending all messages at once.
# Send a batch of 360 messages per batch period:
# batch period is set to 3600 seconds (=1 hour):
# Pause between messages (in seconds) to avoid overloading the server:
If you fix the “N” to 50 emails and the “T” every 300 seconds for a total of 1000 emails sent, the system is gonna take 60 minutes to send all emails.
If the restriction is set to 500 emails per hour, should you program a mass mailing for 500 emails within one hour? The answer is no, and here’s why: It is recommended to keep a gap between the “per hour” limit and what you send with PHPList. You will probably send individual emails during the course of your normal activities. If you send a mass email to 500 peoples in an hour, how will you respond to an email that someone writes you? Your limit will be exceeded. So you won’t be able to communicate with anyone during the next hour. It is therefore recommended to fix the mass mailing limit to 450 emails. Thus, you’ll still have 50 mails available within this hour in order to fill your needs while respecting the limits of email per hour imposed by your host.
Slowerupload speed“MailQueue throttling“
This option allows you to insert a pause between each email. This will slow down and better distribute the load of your shipment.
For example: If you choose to put a pause of 10 seconds between each message to be sent, you can set the number of e-mail to send to 360 per hour. Thus, the transmission of your messages won’t clutter the server, you’ll stay within the limit of emails per hour that you’re allowed and you’ll keep the flexibility of sending additional unplanned messages. (40 messages left, if we’re assuming that your sending limit is 400 messages per hour).
# batch processing disabled:
# Batch_period is not effective when batch processing is disabled:
# Pause between messages (in seconds) to send no more than 360 messages per hour:
If you use PHPList as suggested in this document, all your emails will be sent smoothly and shall not be considered as a spam.
*** However, you must comply with any other anti-spam rules already established.