I have a question to do:
I have a table in MySQL database where storing all mail accounts of my website.
Can i send email (like newsletter) to all mail accounts via mail() function or the mail server cut me?(may have many accounts, 300…400…1000 mails)
The PHP code:
<?
for($k=0;$k < mysql_num_rows($result_users);$k++)
{
$row_user=mysql_fetch_array($result_users);
$to=stripslashes($row_user[‘mail_name’]);
echo ‘sending to ‘.$to.’ !!<br>’;
if(!mail($to, $subject, $html, $headers))
{
echo “No mail send!! to $to”;
flush();
sleep(1);
//exit();
}
flush();
set_time_limit(30);
sleep(2);
}//end for($k=0;$k<mysql_num_rows($result_users);$k++)
Please, tell me your opinion,
Thanks a lot for your time..
?>
[code=php]