php - Failed to send message -
i have problem on sending message email list(text file).
code:
<?php $to="emails.txt"; $subject="hey"; $txt="hello..."; mail($to,$subject,$txt); ?>
i not have syntax errors.... msg not sent emails list , proplem here
please advice ,
if have txt file every email address in new line, can make this:
$file = fopen("file.txt", "r"); $subject="hey"; $txt="hello..."; while(!feof($file)){ $to = fgets($file); mail($to,$subject,$txt); } fclose($file);
Comments
Post a Comment