Re: mailing lists/bulk email sending

From: Date: Thu, 07 Dec 2000 19:13:27 +0000
Subject: Re: mailing lists/bulk email sending
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29193@lists.php.net to get a copy of this message
You *really* don't want to mail 1000 people one at a time. That will time out (plus it's a horridly inefficient algorithm).<<
Hmmm... Always worked well for me! It's just my amateur hack, but I use it to email our 5000 clients, no problem. Though you're right the link someone posted: https://www.zend.com/codex.php?id=347&single=1 ... looks a lot better. But yes the method below DOES work fine.
Query("select * from customers group by email"); while ($customers = $db->next_record())
        {
        $subject = "Hi $customers[name]";
        $body = "$customers[name] -
        You look lovely today.";
        mail ($customers[email], etc.);
        print "Emailed $customers[name]";
        flush();
        }
Then just make a simple MySQL maintenance thing, or use phpMyAdmin to administer your list in MySQL!


« previous php.general (#29193) next »