On Wed, 21 Mar 2001 17:01, Dhaval Desai wrote:
> Hi@
>
> I have a database in whih I have a lot of emails. What
> I want to do is basically a small newsletter kindaa
> thing which is to be mailed to all the emails which I
> am goingto pick from the database.
>
> If I use
>
> while($r=mysql_fetch_array($result)
> {
> $email = $r['email'];
> }
> and then use the mail() function to email. It will
> just go to one person . I want it to go to all the ppl
> in the list.
>

Well, doing it that way you would end up sending an email to each person 
on the list. Altenatively you could loop through the email addresses and 
build a cc or bcc to use in the mail() function. Either way, things might 
slow down a bit if you have a significant number of addresses. Somewhere 
out there is an email class that might help.

Alternatively you could use your database to build a 'subscription list' 
for something like majordomo.


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to