mail() process limit

From: Date: Tue, 14 Nov 2000 21:51:12 +0000
Subject: mail() process limit
Groups: php.general 
Request: Send a blank email to php-general+get-25251@lists.php.net to get a copy of this message
I am sending an email message to multiple users from a mysql database. Due to a limit of processes available to me (40), I am only able to send to about 35 people and then the php program stops mailing because I've used my allocation of processes. Can anyone tell me how to mail() in a loop and ensure that I don't go over 20 or so processes, but send to perhaps 200 people with one loop? IE: Some code that will do something like the following. while (<more email addresses to send to>) { $name=<name from table> ; $email=<email from table> ; mail($email,"the subject","Hi, $name, blah blah") ; if (<NbrOfProcesses > 20>) <Do something to kill a done process or wait for one to die or something> ; } } I've tried delays at the end of the loop, but maybe the delay wasn't long enough? How long should the sendmail process last and how can I speed it up or find out when it's done or do something so that I can control the max number of processes WITHOUT stopping the mailing program? Thanks for any help! -- Best regards, Randy mailto:foxpro@minutemanups.com

« previous php.general (#25251) next »