I have a form for sending emails and although it is working - in terms of sending the message - it presents a problem where when receiving these messages in the recipient's email, it comes duplicated.
One message arrives normal with the fields all filled in and the other with the fields blank.
Can you help me with what might be happening?
The code is this below:
<?php
ini_set("SMTP", "localhost");
$nome = $_POST['nome'];
$email = $_POST['email'];
$telefone = $_POST['telefone'];
$mensagem = $_POST['mensagem'];
$dpto = "[email protected]";
$Titulo = "MENSAGEM ENVIADA PELO FORMULÁRIO DO SITE";
$Destinatario = "$dpto";
$mensagem1 = "
Nome: $nome
E-mail: $email
Telefone: $telefone
$mensagem";
mail("$Destinatario","$Titulo","$mensagem1","From:$email");
?>