Re: bulk emailer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 11, 2005, at 2:34 PM, Richard Lynch wrote:

what i'm currently doing:
-using mysql_fetcharray() to loop through an array of query results
-for each iteration of the loop, get an email address from the current row
in the result set, and use it with the mail() function to send out an
individual email to that email address, then echo out a confirmation in
HTML so that the user will know that an email has been sent
-this is repeated for each email address found in the result set
problem with this is: with large result sets (some of my result sets come
up with a few thousand email addresses), users have to wait a long time
for the confirmation messages to print out to their browser, sometimes it
seems that not all the messages go through

Ye Gods!

The mail() function is designed for quickie one-off emails, not sending
out thousands. Hell, it can't even handle dozens, not reliably, at least
not on some hardware/connections.

I have to disagree on this one. I've used the method described above, pulling e-mails from a MySQL table, to send out to well over 10,000 recipients with out error. As a safeguard, I have the script write the id of each record that is e-mailed, so if the script does fail at some point I can easily find out where it left off and tweak the script to start there upon running it again.


I call the script from a browser and its written to print each address as it's sent. It does take some time for the addresses to appear in the browser and the seem to come in batches of a couple hundred at a time, but it will eventually display all of the addresses with some patience.

Nicholas Miller
Intercast Media, Inc.
229 19th Ave.  Suite 4
San Francisco, CA  94121
415-379-9500
415-520-9501 (fax)
nick@xxxxxxxxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux