Dear All,
I'm in the process of implementing the backend for my web site's mailing list and I have a question regarding minimizing server load (which is clearly always a Good Thing).
If I have an array of e-mail addresses (e.g.
>$addresses
in my PHP script), which is more efficient in terms of server load:
Send the message once per address with each address as the "To:" part in turn, e.g.: >foreach ($addresses as $address)
{
mail($address, 'Subject', 'Message');
}
Build up a BCC header and send the e-mail once with a blank or dummy "To:" field, e.g.: >$bcc='Bcc: '.implode(',', $addresses);
mail('dummy', 'Subject', 'Message', $bcc);
I'm leaning towards the second approach but I'm not certain and would like some feedback from an expert.
Thanks for your help,
Richard.