Bootstrap PHP表单不会发送任何东西

I'm trying to finish a project to help out a friend with his website and I can't get the contact form to work. When I hit send: it seems like it has sent but then nothing ends up in the inbox of the email address. (I can't even get Stackoverflow to work... keep getting a "your post appears to contain code that is not properly formatted as code")

Bellow is the website: pservices.comuf.com

Bellow is the PHP code:

<?php
// check if fields passed are empty
if(empty($_POST['name'])        ||
   empty($_POST['phone'])       ||
   empty($_POST['email'])       ||
   empty($_POST['message']) ||
   !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
   {
    echo "No arguments Provided!";
    return false;
   }

$name = $_POST['name'];
$phone = $_POST['phone'];
$email_address = $_POST['email'];
$message = $_POST['message'];

// create email body and send it    
$to = 'cgramsinjapan@hotmail.com'; // PUT YOUR EMAIL ADDRESS HERE
$email_subject = "P Services Contact Form:  $name"; // EDIT THE EMAIL SUBJECT LINE HERE
$email_body = "You have received a new message from your website's contact form.

"."Here are the details:

Name: $name

Phone: $phone

Email: $email_address

Message:
$message";
$headers = "From: noreply@your-domain.com
";
$headers .= "Reply-To: $email_address"; 
mail($to,$email_subject,$email_body,$headers);
return true;            
?>

Far as I can see after going to the contact section of the site you posted, none of your form elements contain a name attribute.

For instance:

<input type="text" class="form-control" id="name" required data-validation-required-message="Please enter your name.">

would need to be changed to

<input type="text" name="name" class="form-control" id="name" required data-validation-required-message="Please enter your name.">
                   ^^^^^^^^^^^

while adding the appropriate name attributes to the other form inputs.

You cannot rely on the id attribute alone.

Also this

<form name="sentMessage" id="contactForm" novalidate>

is missing a post method and an action:

change it to

<form method="post" action="handler.php" name="sentMessage" id="contactForm" novalidate>

using handler.php as the PHP mail handler filename example.

You can also change these two lines:

mail($to,$email_subject,$email_body,$headers);
return true;

to:

if(mail($to,$email_subject,$email_body,$headers)){ 
echo "Mail sent successfully.";
} 
else{ echo "Error.";
}

If it echoes a success, then mail() has been successfully sent.

If it echoes Error, then it's a server problem. Check your mail logs.