I want it to send mail divided to 10 by 10 or 50 by 50 until it reaches the 1000 (for example)
How can I do that?
the code I used ..
- Code: Select all
<?php
$Select = mysql_query("SELECT email FROM users")Or Die(MySQL_Error());
//get
while ($row = mysql_fetch_array($Select)) {
/* what is $to?
all emails*/
$to = $row[email];
//send
$Send = mail($to, "$from" ,"text");
}
//see if sent
if ($Send) {
echo "
<p> </p>
<p><strong><font color='#000099' size='5'>E-mails sent!!</font></strong></p>
";
}
else {
echo "
<p> </p>
<p><strong><font color='#FF0000' size='5'>Error, E-mails not sent
</font></strong></p>
";
}
exit;
?>




i think you are going to love it that way
