Здравствуйте. PHP знаю очень слабо, нужно сделать форму, но она не работает: срабатывает функция success в Ajax, что говорит о том, что все прошло успешно, но на почту ничего не приходит. Почему?
<form method="POST" id="form" action='main.php' name="form">
      <div class="input-1">
        <label for="">Имя:</label>
        <input type="text" placeholder="Иван" autofocus="autofocus" required="required" name="name" id="name">
      </div>
      <div class="input-1">
        <label for="">Отчество:</label>
        <input type="text" placeholder="Иванович" required="required" name="secondName" id="secondName">
      </div>
      <div class="email">
        <label for="email">Email:</label>
      </div>
      <input type="email" id="email" placeholder="example@mail.ru" required="required" name="email">
      <div class="message">
        <label for="area">Сообщение:</label>
      </div>
      <textarea id="message" cols="30" rows="10" placeholder="Введите сообщение..." required="required" name="massage"></textarea>
      <div class="sbm">
        <input type="submit" name="name" value="Отправить">
      </div>
    </form>
$(document).ready(function(){
$('#form').submit(function() {
  $.ajax({
    type: "POST",
    url: "main.php",
    data: $(this).serialize()
  })
  .done(function(){
    alert("Спасибо за письмо");
  })
  return false;
  })
})
<?php
$toWho = "ololo@gmail.com";
$name = Trim(stripslashes($_POST['name']));
$secondName = Trim(stripslashes($_POST['secondName']));
$email = Trim(stripslashes($_POST['email']));
$message = Trim(stripslashes($_POST['message']));
$general = $name . '\n' . $secondName . '\n' $email . '\n' . $message;
if(mail($toWho, "Новое письмо c сайта", $general)) {
echo 'Success';
} else echo 'DAMN';
	?>