Hello,
Quick background: I am a network admin, not a web developer. One of my clients hired a guy to create a website, which he did using PHP. Unfortunately, he ran out of time before moving to California. I published the site on a SBS 2003 server running IIS. I performed the steps necessary to allow PHP scripts to run per this article
http://www.peterguy.com/php/install_IIS6.html
(this server is running Exchange). When you fill out the form and hit send, nothing happens. It does this on the live site and his 'test' server which makes we wonder if it ever worked properly at all. Here is the code from the sendmail.php. Any help would be appreciated.
<?
if(!empty($HTTP_POST_VARS['sender_mail']) || !empty($HTTP_POST_VARS['sender_message']) || !empty($HTTP_POST_VARS['sender_subject']) || !empty($HTTP_POST_VARS['sender_name']) || !empty($HTTP_POST_VARS['sender_company']) || !empty($HTTP_POST_VARS['sender_phone']) || !empty($HTTP_POST_VARS['sender_zip']) || !empty($HTTP_POST_VARS['sender_city']) || !
empty($HTTP_POST_VARS['sender_state']) || !
empty($HTTP_POST_VARS['sender_address']))
{
$to = "
info@ourdomain.com";
$subject = stripslashes($HTTP_POST_VARS['sender_subject']);
$body = stripslashes($HTTP_POST_VARS['sender_message']);
$body .= "\n\n---------------------------\n";
$body .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$body .= "Company Name: " . $HTTP_POST_VARS['sender_company'] . " \n";
$body .= "Telephone: " . $HTTP_POST_VARS['sender_phone'] . " \n";
$body .= "Address: " . $HTTP_POST_VARS['sender_address'] . " \n";
$body .= "Zip Code: " . $HTTP_POST_VARS['sender_zip'] . " \n";
$body .= "City: " . $HTTP_POST_VARS['sender_city'] . " \n";
$body .= "State: " . $HTTP_POST_VARS['sender_state'] . " \n";
$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>