I am working on a site and I want to know if this is possible...

I have a script set up to email people on an email list (thats the basics of the script any way)

The script goes to a MySQL database gets the query.

Then I use a while statement on the result from the query and email till the while exits. This has worked until now...

The problem happens when there are more than about 100 people on the list. It seems like i hit "send" and then I wait and wait. Eventually IE just stops doing anything. (No moving world/ie icon and nothing in the status bar.) Kinda like IE gave up on the operation (timed out).

So, what I was thinking is this. To prevent IE from forgetting about the operation is this possible? Can you set it up so that each time the while loop loops, it would send a "Email sent to blach@balc.com" to the browser to display?

SO you'd get in the first 2 secs


and then in the next sec you'd see


etc etc...

Finally, if the way I am going about this mailing thing is wrong, let me know of that too. Is there a better way then just a simple while statment off the results? It looks like this:

PHP Code:

while ($row mysql_fetch_array($result)) {
$newMail $mailBody;
$newMail str_replace('!email',$row["email"],$newMail);
$newMail str_replace('!fName',$row["fName"],$newMail);
$newMail str_replace('!lName',$row["lName"],$newMail);
$newMail str_replace('!city'$row["city"],$newMail);
$newMail str_replace('!state',$row["state"],$newMail);
$newMail str_replace('!dts',$dts,$newMail);

$mailtail str_replace("!link","http://www.freejokebooks.com/remove.php3?email=$row[email]&listName=$listName",$mailtail);
$newMail .= "\r\n\r\n" $mailtail;
mail("$row[email]""$subject"$newMail"From: $fromAddress"); 
"User emailed: $row[email]<br>");