if (isset($_POST['invia'])) {
$nome = $_POST['nome'];
$email = $_POST['email'];
$msg = $_POST['msg'];
if (($nome == "") || ($email == "") || ($msg == "") || ($nome == "Nome") || ($email == "Email") || ($msg == "Messaggio")) {
echo("");
} else {
$body = "Nome: ".$nome."
Email: ".$email."
Messaggio: ".$msg."
";
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html; charset=iso-8859-1\r\n";
$header .= "From: ".$email." <".$email.">\r\n";
$header .= "Reply-to: ".$email."\r\n";
$destinatario = "info@aliasbox.it";
$oggetto = "Preventivo";
$messaggio = $body;
if (mail($destinatario, $oggetto, $messaggio, $header)){
header("Location: contacts2.php");
} else {
echo("");
}
}
}
?>
|
|
|
|
|
|