I am trying to send a simple web form from a site I just moved to Host Gator. Can anyone tell me what I am doing wrong? My file name is formail2.html. When I name it with the extension .php I get a 404 error. When I change it to .html it runs, displays the html message but does not send the email.
Please help. Thank you.
contents of formail2.html:
we are about to send you mail
[php]<?php
$sendto= "[email protected]";
$subject=“test subject”;
$body=“this is the body”;
$headers = “From: [email protected]\r\n”;
$headers .= " Reply-to: [email protected]\r\n";
mail($sendto, $subject, $body, $headers);
header(“Location:index.html”);
?>[/php]
Thank you for contacting us. We will be in touch with you very soon.