I am working on simple website but facing some problems with contact form, I try all type of settings but Its didnt work.
The problem is When I fill form and press submit button then It will be shows "Message sent successfully" But I cant receive any mail to my mail ID.
So What Can I do...???
My PHP CODE
: file name is "mail.php
"
<?php
echo '<html xmlns="http://www.w3.org/1999/xhtml">';
echo '<head>';
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
echo '<title>';
echo $title;
echo '</title>';
echo '</head>';
echo '<body>';
$to = "anup.karanjkar08@gmail.com;
$subject = $_REQUEST['Name'] + "Sent a Mail";
$message = $_REQUEST['Message'] ;
$from = $_REQUEST['Email'] ;
$headers = "From:" . $from;
$a= mail($to,$subject,$message);
if ($a) {
echo "Message sent successfully";
}
else
{
echo "Sorry there is an error.";
}
echo '</body>';
echo '</html>';
?>
My HTML CODE
<form name="contact_to_infrasure" id="infrasure" action="mail.php" method="POST">
<div class="row-fluid">
NAME<br><input type="text" name="Name">
</div>
<div class="row-fluid">
EMAIL<br><input type="text" name="Email"><br>
</div>
<div class="row-fluid">
MESSAGE<br><textarea rows="5" style="width: 60%" name="Message"></textarea><br>
</div>
<div class="row-fluid">
<!-- <input class="span3" type="submit" value="SEND MESSAGE"> -->
<button class="btn" type="submit" value="Submit" onClick="">SEND MESSAGE</button>
</div>
</form>
Please Help Me...!!!