Re: Sending out mass mail without having timeout problems ..

From: Date: Tue, 11 Dec 2001 08:39:33 +0000
Subject: Re: Sending out mass mail without having timeout problems ..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77420@lists.php.net to get a copy of this message
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" <bain@thos.co.za> To: "php general list" <php-general@lists.php.net> 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 > bain@thos.co.za > +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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#77420) next »