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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.