When sending mail to a big list using the mail() function you don't see the progress. It can take a long time to send the mail and the user does not see if the process is working or not. Here is a solution that shows the activity in real time by printing the emails and using the flush() function.
<?
include"dbcon.inc" //DB connection settings
$Result=mysql_query("SELECT Name,Email FROM Emails"); //Get the list of emails
While($row = mysql_fetch_object($Result)) {
Echo"Sending Mail to $row->Email";
mail($row->Name ."<" . $row->Email . ">","The Subject","The body","The Headers");
flush(); //This will flush the names to the screen after each mail.
}
?>