-1
Hello, I have been making the form with Html5 and using a separate PHP code to send the form this way.
php -> { if (isset($_POST['BTEnviar'])) {
//Variaveis de POST, Alterar somente se necessário
//====================================================
$nome = $_POST['nome'];
$email = $_POST['email'];
$telefone = $_POST['telefone'];
$mensagem = $_POST['mensagem'];
//====================================================
//REMETENTE --> ESTE EMAIL TEM QUE SER VALIDO DO DOMINIO
//====================================================
$email_remetente = "[email protected]"; // deve ser uma conta de email do seu dominio
//====================================================
//Configurações do email, ajustar conforme necessidade
//====================================================
$email_destinatario = "[email protected]"; // pode ser qualquer email que receberá as mensagens
$email_reply = "$email";
$email_assunto = "Contato do Site meusite.com.br"; // Este será o assunto da mensagem
//====================================================
//Monta o Corpo da Mensagem
//====================================================
$email_conteudo = "Nome = $nome \n";
$email_conteudo .= "Email = $email \n";
$email_conteudo .= "Telefone = $telefone \n";
$email_conteudo .= "Mensagem = $mensagem \n";
//====================================================
//Seta os Headers (Alterar somente caso necessario)
//====================================================
$email_headers = implode ( "\n",array ( "From: $email_remetente", "Reply-To: $email_reply", "Return-Path: $email_remetente","MIME-Version: 1.0","X-Priority: 3","Content-Type: text/html; charset=UTF-8" ) );
//====================================================
//Enviando o email
//====================================================
if (mail ($email_destinatario, $email_assunto, nl2br($email_conteudo), $email_headers)){
}
else{
echo "</b>Falha no envio do E-Mail!</b>"; }
//====================================================
-> HTML
<section id="contact" style="background-image: url("assets/img/contato3.jpg");background-color: #181818;">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="text-uppercase section-heading">Fale conosco <i class="icon-speech"></i></h2>
<h3 class="section-subheading text-muted" style="color: rgb(255,255,255);font-family: Montserrat, sans-serif;font-style: normal;"><strong>MANDE PELO FORMULÁRIO ABAIXO OU PARA O EMAIL:</strong><br><strong>[email protected]</strong></h3>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<form id="contactForm" name="contactForm" novalidate="novalidate">
<div class="form-row">
<div class="col col-md-6">
<div class="form-group"><input class="form-control" type="text" id="name" name="nome" placeholder="Seu Nome *" required="" autocomplete="on" inputmode="latin-name" minlength="3" autofocus=""><small class="form-text text-danger flex-grow-1 help-block lead"></small></div>
<div
class="form-group"><input class="form-control" type="email" id="email" name="email" placeholder="Seu Email *" required="" autocomplete="on" inputmode="email" minlength="5"><small class="form-text text-danger help-block lead"></small></div>
<div class="form-group"><input class="form-control" type="tel" name="telefone" placeholder="Seu número *" required="" autocomplete="on" inputmode="tel" minlength="9"><small class="form-text text-danger help-block lead"></small></div>
</div>
<div class="col-md-6">
<div class="form-group"><textarea class="form-control" id="message" name="mensagem" placeholder="Conte mais sobre seu projeto *" required="" inputmode="latin" minlength="15"></textarea><small class="form-text text-danger help-block lead"></small></div>
</div>
<div class="col">
<div class="clearfix"></div>
</div>
<div class="col-lg-12 text-center">
<div id="success"></div><button class="btn btn-primary btn-xl text-uppercase" type="submit" name="BTEnviar" id="sendMessageButton">Enviar</button></div>
</div>
</form>
However it is not working and sending and when I press the confirm button would like a send confirmation message to appear on the screen with the name of input nome
something like: [nome], sua mensagem foi enviada com sucesso!