Re: Loop though email list

From: Date: Tue, 14 Aug 2001 21:13:54 +0000
Subject: Re: Loop though email list
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62703@lists.php.net to get a copy of this message
With mysql: $connection = mysql_connect("host","user","pass"); $db = mysql_select_db("db_to_use", $connection); $sql = mysql_query("SELECT * FROM table ORDER BY email ASC"); while ($row = mysql_fetch_array($sql)) { $email = $row["email"]; $name = $row["name"]; email(EMAIL_FUNCTION_STUFF); } Tyler Longren Captain Jack Communications tyler@captainjack.com www.captainjack.com On Tue, 14 Aug 2001 16:09:22 -0500 "Erich Kolb" <ekolb@randbreceivables.com> wrote: > I am a total newbie, so please forgive the simplicity! > > I have a huge list of email addresses in a text file and also in a MySQL > DB > that I would like to use PHP to loop through and send an email to each > one > of them. How do I loop through a text file using each email in the txt > file > as a seperate email address and send a message to that address? Or > would it > be easier to just do it from a MySQL DB? If so, How?? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#62703) next »