ok im trying to do this script where users can subscribe to a mailing list then all i have to do is go to the admin page and select send to all and it pulls every name out of the list and sends it to them, now when isend it everything looks like it is sent fine but nothing ever comes up in the mail box. but when i typed my email in the selct box it worked, it uses 2 pages, admin.php is where the email is entered, and admin_mail.php, which has the code to send the mail, here is the code for admin.php...
<form action="admin_mail.php" method="POST">
<div align="left"><p><font face="Arial" color="#0000FF">Send
Mail</font><font
color="#000000" face="Arial"><br>
<small> To:</small><select name="to" $
<option selected value="ALL">Send To Everyone</option>
<option
value="brooks@paisd.net">Brooks</option>
$mail_list_path = "/home/brooks/public_html/scripts/";
<?
$toemails = file("email_list.txt");
sort($toemails);
for($index = 0; $index < count($toemails); $index++)
{
?>
<option value="<?$toemails[$index]; print("\">$toemails[$index]</option>");
}
?>
</select>
<br><small>Subject:<input type="text" size="28" name="subject"
value="New PHP Scripts Released!"></small></font></p>
</div><div align="center"><center><p><font face="Arial"><textarea
name="comments" rows="5"
cols="64"></textarea><br>
<small>Enter your message body above</small> <input
type="submit" value="Submit">
<input type="reset" value="Reset"></font></p></center></div><div
align="center">
and here is the code for admin_mail.php
<?
$from_header = "From: <Brooks> brooks@paisd.net";
if($comments != "")
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $comments, $from_header);
// redirect back to url visitor came from
header("Location: http://tuna.port-aransas.k12.tx.us/~brooks/scripts/thanks.htm$
}
else
{
print("<BODY>Error, no comments were submitted!");
print("</BODY>");
}
?>
any help is greatly appreciated, thanks,
-BS