I'm receiving an error when PHP is sending mail to a person.
This is the small script i'm testing with:
<?php
extract($HTTP_GET_VARS);
if ($address=="") {
echo "<form action=\"mailtest.php\" method=get><p>Address to email: <input type=text name=address></p>";
echo "<p><input type=submit value=\"Send email\"></p>";
} else {
$subject = "Testing mail() function";
$message = "This is a test email";
mail($address,$subject,$message,"From: \"Mail Test\" <$address>");
echo "<p>Mail sent. Were any errors shown? If there were, mail is probably not set up correctly.</p>";
}
?>
I just get a Warning: Server Error in mailtest.php when I try to send mail.
are there any tutorials on how to setup php and get mail to work on a windows based machine with IIS? I wouldn't think it would be this difficult.