<?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $to = "[email protected]"; $subject = "Hello"; $body = "You have received a message from " . $name . " (" . $email . "):\n\n" . $message; $from = "From:"; $headers = "From:" . $from . "\r\n"; $headers .= "Reply-To: " . $from . "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); if (filter_var($email, FILTER_VALIDATE_EMAIL)) { if ($name != '' && $email != '' && $message != '') { if (mail ($to, $subject, $body, $headers)) { echo '<p style="color:#66A325;">Thanks! Your message has been sent.</p>'; } else { echo '<p style="color:#F84B3C;">Something went wrong, go back and try again!</p>'; } } else { echo '<p style="color:#F84B3C;">You need to fill in all required fields!</p>'; } } else { echo '<p style="color:#F84B3C;">Invalid Email, please provide an correct email.</p>'; } ------------------------------------------------------------------------------- **Lo llamo desde el formulario** <form id="contact-form" class="contact-section" method="post" action="contact.php"> <input class="name plain buffer" type="text" name="name" placeholder="Nombre"> <input class="email plain buffer" type="email" name="email" placeholder="Email"> <textarea class="plain buffer" name="message" placeholder=" Escriba su comentario.></textarea> <input id="send" class="plain button green" type="button" value="Enviar Mensaje"> <input id="reset" class="plain button red" type="reset" value="Reestablecer los campos"> </form> **y js** <script> $(document).ready(function(){ $('#send').click(function(){ $(this).val('Enviando ...'); $('#success p').remove(); $.post('contact.php', $('#contact-form').serialize(), function(response) { $('#success').html(response); //$('#success').hide('slow'); $('#send').val('Enviar Mensaje'); }); return false; }); }); </script>