I have a form that emails the message. It turns out that the code I have here does not seem to be working the redirect portion for confirmation page or upload error:
<?php
// Destinatário:
$para = "[email protected]";
// Assunto:
$assunto = "ASSUNTO X";
// Data de Envio:
$data_envio = date("d/m/Y h:i:s");
// Dados do Formulário:
$email = $_POST["email"];
$mensagem = "MSG X";
$mensagem .= "Enviado em $data_envio.";
$headers = "MIME-Version: 1.1\r\n";
$headers .= "Content-Type:text/html; charset=UTF-8\r\n";
$headers .= "From: $para\r\n";
$headers .= "Return-Path: $para\r\n";
$headers .= "Reply-To: $email\r\n";
$envio = mail($para, $assunto, $mensagem, $headers);
if($envio) {
header("location:respostaform_ok.html");
}
else {
header("location:respostaform_erro.html");
}
?>
I can receive the message by email, but the user who sends the msg can not see the confirmation page.
Could anyone help? Thank you.