On Sunday 20 April 2008 11:27:38 Jeffrey wrote:
> I'm working on an application that includes e-mail notifications of
> certain events. Because the application will have hundreds or thousands
> of users, I've designed it so that e-mail notifications are saved to a
> MySQL table. Then a regular cron job runs a php page to select the data
> from the table, put it into a mail() command and mail.
>
> My original vision was to have the script do about 50 mails, then pause
> for a 5 seconds, do a meta refresh and run through another 50 and so on
> - with experimentation in numbers as necessary. This process was set up
> because I recall reading somewhere - perhaps the manual - that it is not
> a good thing to run too many php mail()s in succession. Also, I worry
> about php time-outs.
>
> If you know more about PHP and 'nix than I do, you already realise the
> fatal flaw here: meta refresh doesn't work on a cron job.
>
> Question: is there an alternative? I appreciate I could use sleep()
> after every 50 mails - but there would still be the time-out problem.
>
> I've searched the manual and via Google - but haven't found anything -
> possibly I am searching on the wrong terms.
>
> Your help will be much appreciated.
>
> Thanks,
>
> Jeffrey

What a waste. Is the MTA operational on the server? if so, forget mailing with 
php and rather use php to access the mta. It is designed to actually send 
mails, lots of lots of em. If not, set it up.
I recon a cluster with hundreds of thousands of users ought to have such a 
thing... a couple of blades or some of those solaris niagara 8 core nicies 
doing it.


-- 
---
Børge Holen
http://www.arivene.net

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

Reply via email to