Re: writing a list of email addresses

From: Date: Thu, 24 Apr 2003 02:06:03 +0000
Subject: Re: writing a list of email addresses
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145108@lists.php.net to get a copy of this message
The mail() function will accept recipients in the following form: "name" <email> it's always a good idea to have quotes around the name. to add more than one recipient, just format your "To" line like this: $to = "\"First Person\" <firstemail>, \"Second Person\" <secondemail>" etc. -Jake "Peter Gumbrell" <peter@orillia.net> wrote in message news:B9662969-75F5-11D7-994D-000393AB7938@orillia.net... I would like to pull a list of email addresses from a group of users, based on certain conditions, then format the list so that it can be used within the mail() function. Am I right in assuming that there will need to be a semi-colon between each address? So far I have: $sql_email = "SELECT email from users where level = 'admin'"; $res = mysql_query($sql_email); while ($res_email = mysql_fetch_array($res)) but I am unsure as to what the next line should be. Any help would be appreciated. Many thanks Peter Gumbrell

« previous php.general (#145108) next »