Hi there,
am currently writing a mass mail web application in php. The thing is that the software should be able to send e-mail in batches and pause interval between.
I wrote this little script to send in batch:
PHP Code:if($totalemails <= 5000) {
$batch = 400;
$interval = 60;
} elseif($totalemails <= 15000) {
$batch = 500;
$interval = 90;
} elseif($totalemails <= 30000) {
$batch = 300;
$interval = 120;
} elseif($totalemails <= 50000) {
$batch = 200;
$interval = 120;
} else {
$batch = 100;
$interval = 180;
}
But the above script is the wrong way because if the user has 400 emails. The system will send all the 400 recipient at one time hence no pause interval.
Can you please help me the find a solution to this? The system should calculate how many batch either $totalemails = 400 or $totalemails = 40000 for example.
The interval can be 60 seconds in every cases.
Waiting for you help.
Thanks



Reply With Quote

Bookmarks