Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Iteration mail(), or use Bcc?


Message #1 by UltimateMSTS@a... on Thu, 6 Jun 2002 19:11:12
PHP is not the best solution for this.  Mass mailing software is different
than basic mail software in the pointthat it is designed to handle the high
volume better.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: <UltimateMSTS@a...>
To: "professional php" <pro_php@p...>
Sent: Thursday, June 06, 2002 7:11 PM
Subject: [pro_php] Iteration mail(), or use Bcc?


> Hello to everyone,
>
> I'm developing a mailing list manager, which must be capable of sending
> multiple emails simultaneously- e.g. 500 at one click.
>
> However, previous experiments that I've undertaken with the mail() method
> have found that this can cause the browser to timeout, or in extreme cases
> the system can 'lock-up', if used in an iterating state - in other words,
> using a for(...) loop in this format:
>
> <<<
>
> $EmailRecipients = new Array(); // An array for storing email recipients
>
> for($index=0; $index < count($EmailRecipients); $index++)
> {
>    $ToEmail = $EmailRecipient[$index]["Email"];
>
>    mail($ToEmail, $Subject, $Body);
> }
>
> >>>
>
> This was only an example to show the principle.
>
> However, each mail() loop can take upto 1 second to execute, and when
> running 500 emails off at once, the browser will timeout.
>
> --------------
>
> So, this brings me to my second conclusion:
> Can the Bcc: field be used, and all emails sent just once - without the
> need for a loop at all? Is this Bcc: theory quicker than sending many
> messages, or would using both together do the job (break down each loop
> iteration into alphabetical letters, and send Bcc: within that)?
>
>
> Any thoughts, ideas or comments very welcome,
> I would try this idea out myself but (a)I don't have a large DB of email
> addresses, (b)I felt that someone else might gain some ideas from this.
>
> Thanks,
> Charles Lyons.
>




  Return to Index