php mail sending to multiple address

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
lamia
Forum Newbie
Posts: 11
Joined: Sun Jun 19, 2005 2:21 am

php mail sending to multiple address

Post by lamia »

Hi, I'd like to ask what's the best way to send an e-mail to multiple addresses? Assuming I have 10 records in my database... Is it smart to use a while loop in that? Thanks!
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

foreach or while works just fine when working with mail().
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

if you wanna just send the mail once, you can comma separate them.
Post Reply