In background : 1)$result_does_not_matter = `/path/to/your/massmailer.php 1>mail_std_out.log 2>mail_std_err.log &`; 2) use exec with cmd as the above. With PHP you can write PHP shellscripts: #!/usr/local/bin/php -q <?php // ...some code here // in the code you may use sleep() or usleep() in a cycle. The cycle uses one big result set which had been got before the cycle or makes like this: // $res= mysql_query(''select email from employee limit ".$start++.",1"); // list($email) = mysql_fetch_array($res); // mysql_free_result($res); ?>
HTH Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS ----- Original Message ----- From: "bain" <[EMAIL PROTECTED]> To: "php general list" <[EMAIL PROTECTED]> Sent: Tuesday, December 11, 2001 10:41 AM Subject: [PHP] Sending out mass mail without having timeout problems .. > Hi all > > I've been working on a system for our company that uses MySQL to grab > user data and then send personalized mail to them once a month. > > currently I step thought the mysql result mailling one mail per return. > > as you can imagine .. my script timeout value is sitting on 24hours to > allow all the mail in our big database to go throught. > > Is there a way I can fork or thread the mail send process so I can send > more then one mail at a time .. or maybe even buffer the MySQL result > and send the mail in the background but still return the browser .. > > any sugestions .. please > > -- > Henti Smith > Systems Administrator > The House Of Synergy > http://www.thos.co.za > [EMAIL PROTECTED] > +27 11 259-9821 > -- > > Let us not look back in anger or forward in fear, but around us in > awareness. > -- James Thurber > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]