联系人html和邮件php之间的连接不良[重复]

This question already has an answer here:

CSS y PHP of my contact-form. The page works perfectly but I'm trying to send an email and the button of send doesn't work. In the image you can see that when I try to send an email the button stays white. At the same time the button Clear works perfect! I attach my code

CONTACT.HTML

<form action="mail.php" method="POST" class="contact-form">

    <input type="text" name="name" placeholder="Name" class="required">

    <input type="email" name="email" placeholder="Email address" class="contact-form-email required">

    <input type="text" name="subject" placeholder="Subject" class="contact-form-subject">

    <textarea name="message" placeholder="Message" class="required" rows="7"></textarea>

    <div class="response-message"></div>

    <button class="border-button" type="reset" id="reset" name="reset">Limpiar</button>
    <button class="border-button" type="submit" id="submit" name="submit">Enviar</button>

MAIL.PHP

<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name 
 Message: $message";
$recipient = "sa*********@*******.com";
$subject = "Contact Form";
$mailheader = "From: $email 
";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
</div>

mail function doesn't work on local server and also you need to set SMTP configuration in PHP to send mail.

Are you placing your form inside the form tag?

<form action="mail.php" method="post">
<input type="text" name="name" placeholder="Name" class="required">

<input type="email" name="email" placeholder="Email address" class="contact-form-email required">

<input type="text" name="subject" placeholder="Subject" class="contact-form-subject">

<textarea name="message" placeholder="Message" class="required" rows="7"></textarea>

<div class="response-message"></div>

<button class="border-button" type="reset" id="reset" name="reset">Limpiar</button>
<button class="border-button" type="submit" id="submit" name="submit">Enviar</button>
</form>