Buenas a todos, tengo un problemia a la hora de enviar un formulario a mi mail, me da el siguiente Error:
Mi Web ART es esta de aqui: http://arbolemia.es/
aunque para llegar al formulario mejor entren aqui:
http://arbolemia.es/formulario.html
P.D: mi servidor es de 1&1 (www.1and1.es)
---------------
enviar.php:
formulario.html:
ERROR 403: ¡PROHIBIDO!
El servidor ha entendido la solicitud, pero no la puede llevar a cabo. La solicitud de autorización no será necesaria, ya que esta acción está prohibida y NO ESTÁ PERMITIDO volver a solicitarla.Mi Web ART es esta de aqui: http://arbolemia.es/
aunque para llegar al formulario mejor entren aqui:
http://arbolemia.es/formulario.html
P.D: mi servidor es de 1&1 (www.1and1.es)
---------------
enviar.php:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Formulario de envio Script</title>
</head>
<body>
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
// Punto 1, Valida email
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Regrese - Ingrese un E-mail valido</h2>\n";
$badinput = "<h2>Su comentario no fue enviado</h2>\n";
echo $badinput;
die ("Regrese a completar los datos! ! ");
}
// Punto 2, Valida el nombre, email y mensaje, los campos no tienen que estar vacios.
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Regrese - Rellene todos los campos</h2>\n";
die ("Regrese a completar los datos! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Atencion: $attn \n
Mensaje: $notes \n
From: $visitor ($visitormail)\n
Informacion adicional : IP = $ip \n
Navegador usado: $httpagent \n
Referido de : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("[correo eliminado]", $subject, $message, $from); // Punto 3 cambiar por tu email.
?>
// Punto 4 imprime los datos introducidos
<p align="center">
Fecha: <?php echo $todayis ?>
Gracias : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
Atencion: <?php echo $attn ?>
Mensaje:
<?php $notesout = str_replace("\r", "
", $notes);
echo $notesout; ?>
<?php echo $ip ?>
[url="index.html"] Index [/url]
</p>
</body>
</html>formulario.html:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Formulario</title>
</head>
<body>
<form method="post" action="enviar.php">
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
Nombres:
<input type="text" name="visitor" size="35" />
E-mail:
<input type="text" name="visitormail" size="35" />
Mensaje:
<textarea name="notes" rows="4" cols="40"></textarea>
<input type="submit" value="Enviar Formulario" />
</form>
</body>
</html>