|
Hi all!
I have a problem with a mailform (who doesnīt?). I have a dynamic flash template with an built in contact form. When I try it, I get this error:
------------
Warning: mail(): Bad parameters to mail() function, mail not sent. in /hsphere/local/home/smultronkort/smultronkortet.se/site_flash/contact.php on line 40 Your message was successfully sent!
------------
In my main .html file i have the value &recipient=myemail@mysite.com. The support tells me this is the only value i need to change but thatīs clearly not the case.
This is the code as I got it from the template
<?
Error_Reporting(E_ALL & ~E_NOTICE);
while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);
$post_vars[key($_REQUEST)][0]=$pre_array[0];
$post_vars[key($_REQUEST)][1]=$pre_array[1];
}
next($_REQUEST);
}
reset($post_vars);
$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=utf-8';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {
$message.="<strong>".$mess[1]."</strong> ".$mess[0]."<br>";
}
next($post_vars);
}
mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
<script>
resizeTo(300, 300);
</script>
--------------------
Line 40 is </html>" , $headers);
Can anyone help figure this out. Iīm not that good with php but with some trial and error and your help, i believe Iīll solve the problem.
Thanx!
|