"Kancha ." <[EMAIL PROTECTED]> wrote: > I've users in a database classified by differnet > catagories. Now based on category I need to send mail > to all the users in a category. > > Calling mail() function in a loop would be a kill for > the server as there are more than 1000 users in each > category. > > Is there any way of doing this ?? Creating a mailing > list is not possible.
You may want to use a PHP class that uses SMTP directly. There's one Manuel Lemos has written one which is available at http://phpclasses.upperdesign.com/. Another option is to write the emails and recipients to a database and use a cron job to query the db every X minutes and deliver the messages Y recipients at a time until complete. You'd just need to flag the messages and recipients after they've been processed or delete them. I discussed the solution in a reply to a poster with a slightly different problem just a few minutes ago under the subject "Timed Jobs". -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php