Help
|
Posted: 11/11/2003, 5:15 AM |
|
i have same members table like employee dir application.
But I like to send email Depending upon the group they are in for example if they are in marketing i only want to send email to marketing
I can send email to one person at a time but i can't seems to figureout how to do a group email. (CCS2,PHP,Mysql)
Please help
|
|
|
RonB
|
Posted: 11/11/2003, 2:10 PM |
|
use a while loop to do this:
$db= new clsDBConnection1();
$db->query(select user_email from user_table where user_group='marketing');
while ($db->next_record())
{
$a=Array();
$a["email"]=$db->f("user_email");
$mailtext="some text or some text from database"; $mailto=$a["email"];
$mailsubject="some subject";
mail($mailto,$mailsubject,$mailtext);
}
The above example is very simple and can be expanded as you wish but the mechanisme should be clear.
Ron
|
|
|
|