Re: mass mail
| From: | Steve Werby | Date: | Wed, 20 Feb 2002 15:07:11 +0000 |
| Subject: | Re: mass mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85537@lists.php.net to get a copy of this message | ||
"Kancha ." <kancha2np@yahoo.com> 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/