Hi,
I got a problem with my site.
So i got a form on a html website.
i try to mail the information on the form to my email but i never receive an email.
Can someone look at my code to see whats wrong?
<?php
$name = $_REQUEST['name'] ;
$message = "
<html>
<head>
<title>Info</title>
</head>
<body>
<h1>Info</h1>
Name: $name <br>
</body>
</html>
";
$to = 'me';
$subject= "stuff";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: someone';
$success = mail($to, $subject, $message, $headers);
if ($success)
{
header( "Location:success page" );
}
else {
header( "Location:failure page" );
}
?>
I’m able to echo my message correctly… but i always get redirected to the failure page… it’s probably something stupid… but can’t find it.
Any help would be appreciated!