Hi everyone!
To set the scene: Windows 2000 platform, IIS webserver.
We have a 'contact.asp' page with a form that I'm trying to mail using a simple form mailing script written in php. On submitting the form details, I'm getting the following error:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Below is my mailform.php script. What headers should I be returning???
Thanks
Ted
contents of mailform.php
<?php
$msg = "Sender Name:\t$naam\n";
$msg .= "Sender Cell:\t$Cell\n";
$msg .= "Sender Tel:\t$telno\n";
$msg .= "Sender eMail:\t$sender\n";
$msg .= "Message:\t$Quire\n\n";
$recipient = $rec_email;
$subject = "Web Site Feedback";
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=iso-8859-1\r\n";
$mailheaders .= "From: Mayford Website <>\r\n";
$mailheaders .= "Reply-To: $sender\r\n";
echo "<html><head>";
echo "<title>Mail Sent</title>";
echo "<link href=\"mayford.css\" rel=\"stylesheet\" type=\"text/css\">";
echo "</head>";
echo "<body Background=\"MainTop.jpg\" bgproperties=fixed text=#228b22 Link=#dc143c aLink=#ee82ee bgcolor='#e7f4eb' style='margin-left:30px;'>";
echo "<br><br><br><br><br>";
if(mail($recipient, $subject, $msg, $mailheaders))
{
echo "<p>Thank You, <b>$naam</b></p>";
echo "<p>Your query/comment has been sent to $rec_name</p>";
}
else
{
echo "<p>There was an error sending your mail!</p>";
echo "<p>Please try again later</p>";
}
echo "<br><br><br>";
echo "<img src=\"buttonsnew/back.gif\" width=52 height=10 onMouseOver=\"src='buttonsnew/back_over.gif'\" onMouseOut=\"src='buttonsnew/back.gif'\" style=\"cursor:hand;\" onClick=\"window.history.go(-1)\">";
echo "</body></html>";
?>