sending message to all the emails listed in the table

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
kanchan
Forum Commoner
Posts: 80
Joined: Tue Nov 30, 2004 12:03 pm

sending message to all the emails listed in the table

Post by kanchan »

i dunno how to send the email to all the users have their respective emails in table...

can u tell me how???


suppose i have

name email
------- --------
ram ram@hotmail.com
sita sita@hotmail.com
hari hari@hotmail.com
gita gita@hotmail.com


i wanna send message to this users all at once.....

can anybody help me....
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

What kind of table ? Database table ot HTML Table ?
If its db table then just query it and from the results,

Code: Select all

$row=mysql_fetch_assoc($res)
mail($rowї'email'],$subject,$message,$headers)
http://in2.php.net/manual/en/function.mail.php
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

you would have to add together all the email addresses into one string separated by ',' (comma) to send email to all at once
Post Reply