lisawebs Posted August 30, 2007 Share Posted August 30, 2007 there are 2 email addresses on lista.lst but the emails are never sent, but no error, why is this? <html><head><title>Updating file....</title></head><body> <? $addresses = file("data/lista.lst"); for ($index=0; $index < count($addresses); $index++) { mail("$addresses[$index]","Welcome...","text here","From: IN21\nReply-To: [email protected]"); } ?> Your message was sent! <br><br> <a href="index.php3">Home</a>. </body></html> Link to comment https://forums.phpfreaks.com/topic/67275-why-this-is-not-working/ Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 Try adding some debugging code. Such as: <?php $addresses = file("data/lista.lst"); print_r($addresses); for ($index=0; $index < count($addresses); $index++) { if(mail($addresses[$index],"Welcome...","text here","From: IN21\nReply-To: [email protected]")){ print 'mailed to '.$addresses[$index]; }else{ print 'not mailed to '.$addresses[$index]; } } ?> Link to comment https://forums.phpfreaks.com/topic/67275-why-this-is-not-working/#findComment-337499 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.