Jump to content

how send email big list of email id


blacktiger786

Recommended Posts

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!";
   }

?>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/283342-how-send-email-big-list-of-email-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.