Jump to content

Recommended Posts

Posted

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.

Posted

I'm looking into that too. Thanks for the advice. In general, however, which of these two approaches is most efficient (even if I choose not to employ either method in future)?

 

Oh yeah: Is anybody experiencing problems accessing the mailing list features from cPanel at the moment? I cannot get access to them.

 

Thanks, Richard.

Posted

I seem to be able to get to my mailing lists just fine, but I imagine I'm on a different server than you are (if that makes a difference). Anyways, with regards to which method is more efficient, my gut says the second one would be better. But, to be honest, it's not something I've ever really looked into before, so take that with a grain of salt. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...