I use this loop to pull emails from my DB and send them one by one:
PHP Code:
$mailproblem = "";
if (!@mail($to, $subject, $message, $headers))
{
$mailproblem = $front_nonewsmail;
}
/* and to the rest of the users... */
$result = $db->sendnewsletter();
if (!empty($result)) {
while ( list($key,$val)=each($result) ) {
$useremail = stripslashes($val["email"]);
@mail($useremail, $subject, $message, $headers);
}
}
$successmessage = $admin_successmessage;
}
Is it possible to add a delay between each email being sent in order to reduce serverload?? So that you throttle it to at the very least sending 1 email every 6 seconds or so...
__________________ Today is tomorrow, yesterday...