Re: Re: writing a list of email addresses
| From: | Peter Gumbrell | Date: | Thu, 24 Apr 2003 10:59:15 +0000 |
| Subject: | Re: Re: writing a list of email addresses | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145136@lists.php.net to get a copy of this message | ||
Thanks for the reply, but I still have a question. How does one get from the array holding the addresses to the individual addresses?
From:
$sql_email = "SELECT email from users where level = 'admin'"; $res = mysql_query($sql_email); while ($res_email = mysql_fetch_array($res))to
$to = "\"First Person\" <firstemail>, \"Second Person\" <secondemail>"Thanks Peter On Wednesday, April 23, 2003, at 10:06 PM, Jake Malone wrote:
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php