Terry
05-02-2003, 10:17 PM
I'm trying to get my IIS server to sendmail like it does on Apache. I'm working from my home and I installed php on IIS.. I wish I would of used Apache but I kinda like being able to use ASP and PHP without switching servers.
I'm not sure how to configure the ini file. This is what I have:
[mail function]
; For Win32 only.
SMTP = nbsj.phub.net.cable.rogers.com
// I was told by my cable provider that this is the right address
// to there server
; For Win32 only.
sendmail_from = xDev@rogers.com
// this is my email address at rogers
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
Any help would be appreciated. I am getting tired of uploading my php mail scripts to my host(apache) just so I can test the damn things. I have a pretty good development platform going on at home and the only thing that is missing is the ability to send mail.
This is the script I'm trying to send:
<?php
/*
sending out the email
mail(to,subject,body,headers);
*/
$uname = $HTTP_POST_VARS['userName'];
$uemail = $HTTP_POST_VARS['userEmail'];
$uphone = $HTTP_POST_VARS['userPhone'];
$ufax = $HTTP_POST_VARS['userFax'];
$comments = str_replace("\r", "<br />", $HTTP_POST_VARS['comments']);
$mail_to = "terry@conspiracyarchive.com";
$mail_subject = "GTA Form Submission";
$mail_body = $uname;
$mail_body .= " sent you the following message from the GTA website: ";
$mail_body .= "<p>$comments</p>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $uname <$uemail>";
if(mail($mail_to,$mail_subject,$mail_body,$headers)) {
$str = "<div class='subResult'>Thank you for your inquiry.";
$str .= " An email has been sent with your request, we will get in touch with you ASAP.</div>";
echo $str;
} else {
$str = "There was a problem sending the mail.";
$str .= " Please check that you <a href='javascript: void(history.back());'>filled";
$str .= " in the form correctly</a>.";
echo $str;
}
?>
It doesn't even echo anything when I send the form. The else doesn't even show?
Terry
I'm not sure how to configure the ini file. This is what I have:
[mail function]
; For Win32 only.
SMTP = nbsj.phub.net.cable.rogers.com
// I was told by my cable provider that this is the right address
// to there server
; For Win32 only.
sendmail_from = xDev@rogers.com
// this is my email address at rogers
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
Any help would be appreciated. I am getting tired of uploading my php mail scripts to my host(apache) just so I can test the damn things. I have a pretty good development platform going on at home and the only thing that is missing is the ability to send mail.
This is the script I'm trying to send:
<?php
/*
sending out the email
mail(to,subject,body,headers);
*/
$uname = $HTTP_POST_VARS['userName'];
$uemail = $HTTP_POST_VARS['userEmail'];
$uphone = $HTTP_POST_VARS['userPhone'];
$ufax = $HTTP_POST_VARS['userFax'];
$comments = str_replace("\r", "<br />", $HTTP_POST_VARS['comments']);
$mail_to = "terry@conspiracyarchive.com";
$mail_subject = "GTA Form Submission";
$mail_body = $uname;
$mail_body .= " sent you the following message from the GTA website: ";
$mail_body .= "<p>$comments</p>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $uname <$uemail>";
if(mail($mail_to,$mail_subject,$mail_body,$headers)) {
$str = "<div class='subResult'>Thank you for your inquiry.";
$str .= " An email has been sent with your request, we will get in touch with you ASAP.</div>";
echo $str;
} else {
$str = "There was a problem sending the mail.";
$str .= " Please check that you <a href='javascript: void(history.back());'>filled";
$str .= " in the form correctly</a>.";
echo $str;
}
?>
It doesn't even echo anything when I send the form. The else doesn't even show?
Terry