This was just discussed last week.  Here's how:
$connection = mysql_connect("host","user","pass");
$db = mysql_select_db("db_name", $connection);
$sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
while ($row = mysql_fetch_array($sql)) {
        $email = $row["email"];
        $name = $row["name"];
        // code to send email (use the mail() function)

Good luck,
Tyler Longren
Captain Jack Communications

On Thu, 16 Aug 2001 18:29:04 +0200
Jimmy Bäckström <[EMAIL PROTECTED]> wrote:

> Hi list!
> I'm about to write an application that takes about 5000 mailadresses
> from a database, and then sends a mail to each one of them. I haven't
> done this kind of apps before, so I don't know if it's a good idea. Does
> anyone have any suggestions?
> /Jimmy

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to