Jump to content

why this is not working???


lisawebs

Recommended Posts

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

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];
}
}
?>

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.