Re: SV: [PHP] Sending alots of mail

From: Date: Thu, 16 Aug 2001 18:20:38 +0000
Subject: Re: SV: [PHP] Sending alots of mail
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63085@lists.php.net to get a copy of this message
Doesn't that make your script take A REALLY LONG TIME to run? If you do sleep(1) after each call to mail() and send out 1000 e-mails that would be a little over 16 and a half minutes of sleep. At 5000 you are up to over 80 minutes. Isn't this a problem? Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com ----- Original Message ----- From: Daniel Adams <danno@wpi.edu> To: PHP List <php_list@ibcnetwork.net> Cc: php <php-general@lists.php.net> Sent: Thursday, August 16, 2001 12:31 PM Subject: Re: SV: [PHP] Sending alots of mail > Actually I remember that I did have the same problem. I had to use > sleep() also even though I was only sending a few hundred rather than a > few thousand. > - Dan > > On Thu, 16 Aug 2001, PHP List wrote: > > > Thats interesting. > > I tried to do the same thing with 5000 emails using sendmail, and I found > > that only about 1/2 were actually sent, it seems like the multiple calls to > > mail caused some of them to be ignored. I had to sleep for a couple of > > seconds before each call to mail() in order to get them all out. > > > > No one else had this problem? > > > > ----- Original Message ----- > > From: "Tim" <infoz@earthlink.net> > > To: "Jimmy Bäckström" <broder_b@chello.se> > > Cc: "Tyler Longren" <tyler@captainjack.com>; > > <php-general@lists.php.net> > > Sent: Thursday, August 16, 2001 9:39 AM > > Subject: Re: SV: [PHP] Sending alots of mail > > > > > > > I have a system where we send periodic batches of 60,000 messages at a > > > time, so it's definitely doable. It helps to put some throttling in > > > there (i.e. a sleep() periodically) to be kind to your e-mail server. > > > > > > - Tim > > > > > > On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote: > > > > Hmm I knew that =) > > > > I just wondered if it's such a good idea. 5000 mail is very much you > > know. > > > > > > > > /Jimmy > > > > ----- Original Message ----- > > > > From: Tyler Longren <tyler@captainjack.com> > > > > To: Jimmy Bäckström <broder_b@chello.se> > > > > Cc: <php-general@lists.php.net> > > > > Sent: Thursday, August 16, 2001 6:25 PM > > > > Subject: Re: [PHP] Sending alots of mail > > > > > > > > > > > > > This was just discussed last week. Here's how: > > > > > $connection = > > > > > mysql_connect("host","user","pass"); > > > > > $db = mysql_select_db("db_name", $connection); > > > > > $sql = mysql_query("SELECT * FROM table_name ORDER BY email > > > > > ASC"); > > > > > while ($row = mysql_fetch_array($sql)) { > > > > > $email = $row["email"]; > > > > > $name = $row["name"]; > > > > > // code to send email (use the mail() function) > > > > > } > > > > > > > > > > Good luck, > > > > > Tyler Longren > > > > > Captain Jack Communications > > > > > tyler@captainjack.com > > > > > www.captainjack.com > > > > > > > > > > > > > > > > > > > > On Thu, 16 Aug 2001 18:29:04 +0200 > > > > > Jimmy Bäckström <broder_b@chello.se> wrote: > > > > > > > > > > > Hi list! > > > > > > I'm about to write an application that takes about 5000 mailadresses > > > > > > from a database, and then sends a mail to each one of them. I > > haven't > > > > > > done this kind of apps before, so I don't know if it's a > > > > > > good idea. > > Does > > > > > > anyone have any suggestions? > > > > > > > > > > > > /Jimmy > > > > > > > > > > > > > > > > -- > > > > > 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 > > > > > > > > > > > > > > > > > -- > > > > 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 > > > > > > > > > > > > > > > > -- > > > 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 > > > > > > > > -- > > > -- > 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 (#63085) next »