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

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -