Email Problem!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Email Problem!

Post by Joe »

I was wondering if it was possible to send an email to every email in my database. The column name which holds the emails is "Emails". Is this possible? I was thinking of creating a while loop to show all the emails and use mail() to send to each address.

Any help appreciated!


Joe 8)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yeah, you can use that.. however you may need to batch the mail if your provider has a limit on mass mailing.. they probably do..
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

also you need to bear script-timeout in mind. Don't set_timeout() to 0 (i.e. never) - that could, in the worst circumstances, crash the server. Rather set a high timeout (59 minutes) and call your mailing script every hour to check if it needs to send more emails.
Post Reply