Hi,
I have a working mailing script as below.
It reads from a text file containing email adress and user ID for personalization (taken from a form). On average, it takes about 20-30 minutes to send out 3,000 emails.
PHP:--------------------------------------------------------------------------------
$fcontents = file ($list_file);
for ($i=0;$i<sizeof($fcontents);$i++) {
$records = split(",", $fcontents[$i]);
$uid=$records[0];
$toAddress=ereg_replace("\r", "", $records[1]);
$toAddress=ereg_replace("\n", "", $toAddress);
$new_body=ereg_replace("EMAIL", $toAddress, $new_body);
$new_body=ereg_replace("UID", $uid, $new_body);
mail($toAddress, $subject_line, $new_body, $headers);
}//end store array and send
Are there anything I can do to make the script run faster, and reduce CPU load on the server?
Or if anyone know of a mailing list script, please let me know.
Or, is it totally dependent on the performance of the machine SendMail is on?
Thanks,