Ok, I know this has probably been covered up and down, but every solution I've searched for here has failed...
Server setup
Linux/Apache
using sendmail
I use this code which I believe to be fairly straight forward:
<?
$from=$POST['from'];
$contents=$POST['contents'];
$to=$POST['email'];
$from_header="From: $from";
if($contents != "")
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
header("Location: $HTTP_REFERER");
}
else
{?>
<form action="<? $SERVER['PHP_SELF']?>" method="post">
<div>From</div>
<input type="text" size="22" name="from"><br>
<div>Subject</div>
<input type="text" size="22" name="subject" value="entry suggestion"><br>
<div>To</div>
<input type="text" size="22" name="email"><br>
<textarea name="contents" cols="22" wrap="VIRTUAL"></textarea>
<button type="submit"></button>
</form>
<? }
?>
And the script executes fine, but I never recieve the email...
Few things to help narrow the problem:
1.) E-mail address is correctly entered in the form
2.) Network admin says the e-mails aren't being caught by the spam filter.
I'd just like the mail to be sent...
Thanks in advance.