Code:
<?php
//connect to database
$query = sprintf("SELECT * FROM mail");
$result = mysql_query($query);
$count = 1;
while ($row = mysql_fetch_assoc($result)) {
$email = $row['Email'];
mail($email, 'My Subject', $message);
if ($count % 5 == 0) {
sleep(5); // this will wait 5 secs every 5 emails sent, and then continue the while loop
Leave a comment: