Page 1 of 1

sending mail to all addresses in database

Posted: Thu Jul 07, 2005 11:34 am
by some_new_guy
Hi there.

I'm relatively new to php. I have set up a database which collects information from users; one piece of the information includes their email address.

What I'd like to know is how I can email all of these members at once. I'm assuming I need to use a form, with a script that connects to the database. However, I'm unsure how to approach this.

Again, I'm fairly new, so take it easy on me.....

Thanks in advance.

Posted: Thu Jul 07, 2005 12:03 pm
by pickle
Look into mail(): http://www.php.net/manual/en/function.mail.php . There may be a way to email multiple addresses at once.

Another way to do it is to send an individual email for each email address, rather than one email for everyone.

Posted: Thu Jul 07, 2005 12:40 pm
by Burrito
what I usually do is generate a comma separated list of the email addresses and send only one mail.

that way you're not making several calls to the mail server for one purpose...