I am try to get what is problem but not find out.Please Help me.What is problem in this code.only mail not send message will show "pass". This code is not send mail but message will show pass.
<?php
$name = $_POST['name'];
$employeestrength = $_POST['employeestrength'];
$companyweb = $_POST['companyweb'];
$contactpersonname = $_POST['contactpersonname'];
$contactnumber = $_POST['contactnumber'];
$emailaddress = $_POST['emailaddress'];
$cityandstste = $_POST['cityandstste'];
$massege = $_POST['massege'];
$captch = $_POST['captch'];
$to = "balvant.alpha@gmail.com";
$subject = "E-mail from HRMSsystem.com for new requirement";
$message = "<br>";
$message .= "<b>Name :</b> $name <br>";
$message .= "<b>Email :</b> $employeestrength <br>";
$message .= "<b>organization :</b> $companyweb<br>";
$message .= "<b>Phone Number:</b> $contactpersonname <br>";
$message .= "<b>Comapny :</b> $contactnumber <br>";
$message .= "<b>City :</b> $emailaddress <br>";
$message .= "<b>Description :</b> $cityandstste <br>";
$message .= "<b>Massege :</b> $massege <br>";
$message .= "<b>captch :</b> $captch <br>";
$message .= "<br>";
$header = "From:no-reply@hrmssystem.com \r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html\r\n";
$body = "We have received the following information:\n\n";
$headers2 = "From:no-reply@hrmssystem.com";
$subject2 = "Request to get listed into HRMSsystem.com";
$message2 = "Dear, Thank you for request and details to list into HRMSsystem.com directory. Our team will verify and list your details into directory as soon as possible. Kindly contact team@hrmssystem.com for more details or questions.";
$retval = mail($to,$subject,$message,$header);
mail($to, $subject, $body);
$send2 = mail($emailaddress, $subject2, $message2,$headers2);
if( $retval == true )
{
//echo "pass";
header('Location: http://localhost:8080/caofficeautomation/');
}
else{
echo "Message could not be sent..."; }
?>
Thanks Please Help Me for short Out this problem.