|
|
|
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.
You can see the function here :
http://www.weberdev.com/flush
| <?
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.
}
?> | | |
|
| Find the day of the week for any given year/month/day. Categories : PHP, Date Time, Data Validation, Algorithms, Beginner Guides | | | Email Class Categories : PHP, Mail, PHP Classes | | | PHP and javascript mouseover, mouseout, and mousedown events Categories : PHP, Java Script, Form Processing, Beginner Guides | | | How to preset a text string in a textarea input field Categories : HTML, HTML and PHP, PHP, Beginner Guides | | | Easy alert box pop-up function Categories : PHP, Java Script, Beginner Guides | | | Newbie Notes #1 - Making a form return to itself Categories : PHP, Beginner Guides, HTML and PHP | | | Specify your connection settings and create a link to a MySQL database. Categories : PHP, PHP Classes, Databases, MySQL, Beginner Guides | | | mySQL/PHP/search with multientry
form and table output with colored rows Categories : PHP, Beginner Guides, MySQL, HTML and PHP, Databases | | | Find if a year is leap. Categories : PHP, Date Time, Beginner Guides, Data Validation | | | Introduction to Language Files Categories : PHP, Filesystem, Beginner Guides | | | Upload Via FTP - an alternative to move_uploaded_file Categories : PHP, FTP, Beginner Guides | | | Using this script anyone can easily get a form result to his/her mailbox. You can use this script for any form 2 mail purpose. Categories : PHP, Mail, Form Processing | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, Beginner Guides | | | Newbie Notes #10 - Generating drop downs Categories : PHP, MySQL, HTML, Beginner Guides, Databases | | | session out Timer Categories : PHP, Sessions, Security, Beginner Guides | |
|
|
|