Hey guys
Please can someone help me out with regards to outputting an e-mail address on a page once it has been sent succesfully.
ie.
foreach($emailArray AS $name=>$email){
if(mail($email,"Subject","Body","From: Whoever <me@me.com>")){
echo "E-mail sent to: <b>".$email."</b><br>";
} else {
echo "<font color=\"red\">E-mail NOT sent to: <b>".$email."</b></font><br>";
}
}
So basically, what currently happens, is that it only displays the output of the script once the entire script has finished. So when you are sending 2000 emails, only once the script has completed does it display the results.
How can I go about having each result outputted as it happens?