Hi,
Can anyone tell me if their is a performance difference when sending out a newsletter to list of a thousand or so, as to if you loop through and send it out individually to each recipient, or else loop through to create a list of bcc recipients and then use the mail function.
as below:
while(list($email)=mysql_fetch_row($maillist)) {
$recipient = "$email" ;//get email addresses one by one
mail($recipient, $subject, $message, $headers);//shoot it off one by one
}
Vs
$bccRecipient="bcc: ";//start bcc line
while(list($email)=mysql_fetch_row($maillist)) {
$bccRecipient = $bccRecipient."$email," ;//loop through to get them all
}
$bccLength=(strlen($bccRecipient)-1);//this is needed to knock off the last comma
$bccRecipient=substr($bccRecipient,0,$bccLength);//complete
$headers .= $bccRecipient; //add it to the headers
mail($recipient, $subject, $message, $headers);//shoot it off
Suggestions much appreciated
/s