note 39788 deleted from function.mail by didou

From: Date: Tue, 10 Feb 2004 17:12:15 +0000
Subject: note 39788 deleted from function.mail by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64970@lists.php.net to get a copy of this message
Note Submitter: Dave ---- I am trying to loop through a mySQL table and send an email to each record with some of the record's information. Sample (and abbreviated) code is: <?php while ($item=mysql_fetch_array($items)) { list ($email,$name,$address) = $item; mail ($email,"Your address","Dear $name, your address is $address","From: Me <me@me.com>"); } ?> This code is sending multiple emails to each recipient with each pass. Any thoughts as to why?

« previous php.notes (#64970) next »