Php/Mysql Mailing List Browser Time Out on Send

From: Date: Thu, 18 May 2000 14:38:11 +0000
Subject: Php/Mysql Mailing List Browser Time Out on Send
Groups: php.general 
Request: Send a blank email to php-general+get-156@lists.php.net to get a copy of this message
Hello, I've built a simple mailing list for my community of musicians, where each member can have his own... I've experienced everything works fine to around 50 mails, but then the browser timeout of the page used to send sort of breaks the sending process... Here is an excerpt of the code I use: if ($myrow = mysql_fetch_array($result)) { echo "<div align=\"left\">"; echo $mmsubject; echo "<br><br>"; echo nl2br($mmessage); echo "<br>"; echo "</div>"; $memail=$myrow[memail]; $mname=$myrow[mname]; do { $mmlemail=$myrow[mmlemail]; mail("$mmlemail", "$mname - -=TRIBE=- Mailing List : $mmsubject", $mmessagee, "From: $memailil\nReply-To: $memail\n"); echo "<br>Message sent to ".$mmlemail." - ".$mname."<br>"; } while ($myrow = mysql_fetch_array($result)); mail("jak@mp3-tribe.com", "Copy of $mname -=TRIBE=- Personal Mass Mail Message - www.mp3-tribe.com - $mmsubject", $mmessage, "From: $adminemail\nReply-To: $adminemail\n"); } This code, after getting out the emails from a simple table, sends in a loop the message to the recipients... Now, the resulting page shows the "Message sent to... " up to a certain extent, and then a timeout incurs.... Solutions? (not elegant, I might break up sends in groups of 50.. e.g. send first 50, show result, then send next 50, then .... ) I appreciate your help, and if you want to listen to some techno music while coding ... come o'er! :-) Jak www.mp3-tribe.com

« previous php.general (#156) next »