I have a script called thanks.php3 that is supposed to enter an email address into a text file called newsletter. It is then supposed to send a message to the individual email from a text file called autoresponder.txt.
The email address is inserted correctly into the appropriate text file. Unfortunately, the autoresponder text, which is 74 characters long, displays on the html page and sends a character count, of 74, to the email recipient.
Any ideas why?
<html><head><title>Thanks!</title></head><body>
<?
$Body = readfile("data/autoresponder.txt");
mail("$Email","Welcome to Heartland's Mailing list!",
"$Body","From: Rick\nReply-To: rick@rickclark.com");
$myfile = file("data/newsletter.txt");
$fh = fopen("data/newsletter.txt","w");
for ($index=0; $index < count($myfile); $index++)
{
if ($Email != chop($myfile[$index]))
{fputs($fh,$myfile[$index]);}
}
fputs($fh,$Email."\n");
fclose($fh);
?>
Thank you!
<br><br>
<a href="index.php3">Home</a>.
</body></html>