Ok I have not had luck with my task at hand. So if you can help me out, please do.......
While it is emailing, I want it to show " Sending Emails ........... "
Not 5 minutes into it or when it is done.
The minute I click the send button i want it to show "Sending Emails....."
Or some progress bar or something..
I tried as you can see with the:
print "Sending email..........";
flush();
sleep(5);
And of course that isnt working... So if you can help me out here PLEASE....
$to = $_POST['to'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$x = 1;
$hold = 5; // quantity of emails sent before 3 sec delay
$emails = mysql_query("select * from letters");
while ($sendemail = mysql_fetch_array($emails)) {
$email = $sendemail["email"];
mail($email, $subject,
$message, "From:Mailing <do.not.reply@mysite.com>");
$x++;
if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout
print "Sending email.......";
flush();
sleep(5);
$x = 0;
}
} // end of while loop