Jump to content

[SOLVED] Email to csv list


phpnewbie112

Recommended Posts

Hello, I tried to look around the forum but didn;t find the appropriate answer.

 

I have a txt document with 20 emails 1 email per line acting as a csv file.

 

my code open the csv file

 

$filename = "myfile.txt";
$handle = fopen("myfolder/{$filename}", 'r');
     while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
     {

     echo $data[0];  //to check the output
     sendmail function to $data[0] 
         }

 

but it is only seing the 1st email and not looping throughout the list to send an email to each email. could you pls adivce. thanks

Link to comment
https://forums.phpfreaks.com/topic/112824-solved-email-to-csv-list/
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.