You could form them into an array and then use implode with whatever
delimiter sendmail uses (unless you changed it I believe it is just a
comma).  To test it, try limiting your select statement to the first 50 or
so, then echo everything into a test output page.  Then try with a defined
limit of 1 or 2 to email it to a few test email accounts (hotmail or
whatever) and see if it all works.  I stress this as I may have accidently
at one time in the past tried a test similar to yours with live data.
Needless to say our exchange admin was a bit unhappy.


-----Original Message-----
From: Chris Payne [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 12:14 PM
To: php
Subject: Re: [PHP-DB] newsletter optimization help needed

Hi there.

That makes sense :-)  One question, my brain is kind of dead today (Some
would say always :-)  But how would I get $emailadd to display all the
addresses in the bcc bit?  I know you have to add the addresses, seperate
them with a , etc ..... but for the life of me I can't think straight right
now :-(


while ($row = mysql_fetch_array($sql_result)) {
 $emailadd = $row["EMail"];
 $emailname = $row["emailname"];
 $emailphone = $row["emailphone"];
 $emailaddress = $row["emailaddress"];


> You could change the TO: to something generic like "Email List 
> Subscriber" then add everyone to the BCC field and then generate 1 
> email with 9000 people in the BCC field.  Let sendmail do the rest.  
> It should take less time to send the emails and only a few seconds to 
> generate your page.

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to