blacktiger786 Posted October 27, 2013 Share Posted October 27, 2013 i have a code of email its read email id from text file its work fine when i add 5 email id in text file. then its read email and send to all .. but when i add 50k email id in text file its show also email send but not send anyone please tell me how to read a big text file and send all email id to email here is code... <?php// read the list of emails from the file.$email_list = file("elist.txt");// count how many emails there are.$total_emails = count($email_list);// go through the list and trim off the newline character.for ($counter=0; $counter<$total_emails; $counter++) { $email_list[$counter] = trim($email_list[$counter]); }// implode the list into a single variable, put commas in, apply as $to value.$to = implode(",",$email_list);$subject = "My email test.";$message = "Hello, how are you?";if ( mail($to,$subject,$message) ) { echo "The email has been sent!"; } else { echo "The email has failed!"; }?> Quote Link to comment Share on other sites More sharing options...
mentalist Posted October 27, 2013 Share Posted October 27, 2013 How about only processing n emails before using header to recall the page, passing n to indicate new start pos...? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.