I have a users table in my database. There have 50,000 above email addresses. I want to send email to all at a time. I am using while loop. But my browser hang during send mail. How to send email to all users?
Code:
$qryUserEmail = mysql_query("SELECT username,email FROM users WHERE is_active=1");
if(mysql_num_rows($qryUserEmail)){ //I got 50624 email addresses.
while($getUserEmail = mysql_fetch_array($qryUserEmail)){
//Sending Email code Here...
}
}
I don't know about background-process code. If anybody know please post your answer here. How to send email without taking any time for my related code?