Fail to send mail
Posted: Sun Aug 18, 2002 8:04 am
I'm having problem in sending the mail. The error appear like this:
Warning: Failed to Receive in C:\Program Files\Apache Group\Apache2\htdocs\firstweb\send_simpleform.php on line 19
Can anyone have idea what went wrong?
My php.ini setting is:
Thanks to anyone who can help me... 
Warning: Failed to Receive in C:\Program Files\Apache Group\Apache2\htdocs\firstweb\send_simpleform.php on line 19
Can anyone have idea what went wrong?
Code: Select all
<?
if (($sender_name == "") && ($sender_email == "") && ($message == "")) {
header("Location: http://localhost/simple_form.html");
exit;
}
$msg = "E-MAIL SENT FROM WWW SITE\n";
$msg .= "Sender's Name: $sender_name\n";
$msg .= "Sender's E-Mail: $sender_email\n";
$msg .= "Message: $message\n\n";
$to = "xyz@x.y.my";
$subject = "Web Site Feedback";
$mailheaders = "From: My Web Site <> \n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
?>
<HTML>
<HEAD>
<TITLE>Simple Feedback Form Sent</TITLE>
</HEAD>
<BODY>
<H1>The following e-mail has been sent:</H1>
<P><strong>Your Name:</strong><br>
<? echo "$sender_name"; ?>
<P><strong>Your E-Mail Address:</strong><br>
<? echo "$sender_email"; ?>
<P><strong>Message:</strong><br>
<? echo "$message"; ?>
</BODY>
</HTML>Code: Select all
їmail function]
SMTP = localhost ;for win32 only
sendmail_from = abc@x.y.my ;for win32 only