<?php
if($_POST["nombre"] && $_POST["email"] && $_POST["comentario"] != ""){
$de = $_POST["nombre"];
$destino = "
[email protected]";
$asunto = "FORMULARIO NUEVO";
$mensaje .= "FORMULARIO NUEVO."."\n";
$mensaje .= "\n";
$mensaje .= "NOMBRE: " . utf8_decode($_POST["nombre"]) ."\n";
$mensaje .= "\n";
$mensaje .= "EMAIL: " . utf8_decode($_POST["email"]) ."\n";
$mensaje .= "\n";
$mensaje .= "ASUNTO: " . utf8_decode($_POST["asunto"]) ."\n";
$mensaje .= "\n";
$mensaje .= "COMENTARIO: " . utf8_decode($_POST["comentario"]) ."\n";
$emailheader = "From: LO QUE TU QUIERAS <
[email protected]>\r\n";
mail($destino, $asunto, $mensaje, $emailheader) or die ("Lo sentimos, tu solicitud no ha sido enviada.<br/>Intentelo de nuevo.");
} else {
if($_POST["nombre"] == ""){
echo utf8_encode ('Por favor, indica tu nombre.');
exit; }
if($_POST["email"] == ""){
echo utf8_encode ('Por favor, indica un email de contacto.');
exit; }
if($_POST["comentario"] == ""){
echo utf8_encode ('Por favor, indicanos tu comentario.');
exit; }
}
?>