FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Web Hosting and Domains » FAQ's / Tutorials.

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 08-11-10, 01:36 PM
~Phil~'s Avatar
Member
 
Join Date: Aug 2010
Posts: 32
Default Sending e-mails in batches when using using PHP scripts For sending E-Mails

As we all understand that spamming, sending unsolicited emails is STRICTLY prohibited , so any hosting organization will not allow more
than the specified number of emails in an hour to be sent , the violation may result even to the extent of immediate deactivation of the Account involved in this.

So what can be done if we need to send large number of e-mails using PHP scripts without overshooting the maximum number of e-mails allowed to be
send in an hour ?????

Simply what we can do is send the e-mails in batches... Batches constituting of small number of emails, out of your entire sending list..
With some time interval between each batch..!

To achieve this please follow the following instructions..

( For example here we are taking the limit to send maximum number of e-mails allowed to sent in an hour is 300 ).

The first step is to find the configuration file for your phplist installation

Suppose you find it at location " /home/cPanelusername/public_html/list/config.php ".

Please edit the file using either cPanel File Manager ..

Or if you have shell access, open the file for editing in your favorite editor ( vi,nano or pico ).

Or download the file to your PC and edit using ( notepad, wordpad...etc)


Now look out for the section named "batch processing" in this file.

Here in you'll get code as :

Quote:

# 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);
Now we'll edit these default settings to send the e-mails in batches

Quote:

# 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',12);

These settings allows PHPList to throttle 300 mails per hour, exactly as TOS suggests. The remaining e-mails per domain remain available for normal mailing operations.

Save the file at correct location and you are done...


Or the other work around is..

Quote:
# 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",300);

# 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',12);

The MAILQUEUE_BATCH_SIZE can be any number less than or equal to 300.

This prevents your 12 second delay from sending over 300 per hour.

The MAILQUEUE_THROTTLE should be no less than 12, which allows up to 300 e-mails 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.

So you'll not be having any problem meeting the the limits set be hosting providers for sending maximum number of e-mails per hour...
Even if your account is hosted on shared server !!!!

Last edited by ~Phil~; 08-11-10 at 01:45 PM.
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 07:00 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Reseller Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials