Tema: formulario
Ver Mensaje Individual
  #8 (permalink)  
Antiguo 22/11/2010, 15:40
gravic
 
Fecha de Ingreso: agosto-2010
Mensajes: 7
Antigüedad: 13 años, 8 meses
Puntos: 0
Respuesta: formulario

no me llegan al mail las consultas desde mi web
Hola gente , diseñe mi web y las consultas desde ella no me llegan al mail. eN UN MOMENTO DETERMINADO ,ME FUNCIONO PERO LE EMPECE A HACER CAMBIOS Y ZAS KAPUT, OSEA QUE MI SERVIDOR ES COMPATIBLE CON PHP VERSION 5.3.2acá les mando el código a ver si me pueden ayudar en detectar que esta mal, Gracias!!!!!!!!

form.html


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mi pagina web</title>
<style type="text/css">
<!--
.Estilo1 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #333333;
}
.Estilo18 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #7F005C;
}
.Estilo23 { color: #666666;
font-weight: bold;
}
.Estilo22 {color: #7F005C}
.Estilo24 {font-weight: bold; font-size: 18px; font-family: Georgia, "Times New Roman", Times, serif;}
.Estilo27 {font-weight: bold; font-size: 18px; font-family: Georgia, "Times New Roman", Times, serif; color: #7F005C; }
.Estilo21 {
color: #CCCCCC;
font-size: 16px;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: bold;
}
body {
margin-left: 0px;
margin-top: 0px;
}
.Estilo2 {font-family: Georgia, "Times New Roman", Times, serif}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<table width="884" border="0">
<tr>
<td colspan="2" bgcolor="7F005C">&nbsp;</td>
</tr>
<tr>
<td colspan="2" bgcolor="#CCCCCC"><div align="center"><span class="Estilo22"><span class="Estilo24">Contáctese</span></span><span class="Estilo27">/ Contact us</span></div></td>
</tr>
<tr>
<td width="439"><div align="center"><span class="Estilo27">[email protected]</span><br />
<span class="Estilo23">Cel: 156-000-0000<br />
Fax: (5411) 40000000 </span>
</p>
<br />
</div></td>
<td width="435"><div align="center"><span class="Estilo18">Atención telefónica de 10 AM a 6 PM</span></div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#7F005C"><div align="center"><span class="Estilo21">O envíenos su consulta completando este formulario con su datos</span></div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#7F005C"><div align="center"><span class="Estilo21">Or please write your message here </span></div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#CCCCCC"><form action="mail.php" method="post">
<div align="center"><span class="Estilo1">nombre:</span>
<input type="text" name="name">
<br />
<br>
<span class="Estilo1"> e-mail :</span>
<input type="text" name = "email">
<br>
<br>
<span class="Estilo1">Consulta</span><br>
<textarea name="comments" cols="27" rows="8"></textarea>
<br>
<br>
<input name="Submit" type="submit" class="Estilo18" id="Submit" value="enviar" />
</div>
</form> </td>
</tr>
<tr>
<td colspan="2" bgcolor="7F005C">&nbsp;</td>
</tr>
</table>
</body>
</html>

mail.php
<?
function checkOK($field)
{
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
}
}
$name=$_POST['name'];
checkOK($name);
$email=$_POST['email'];
checkOK($email);
$comments=$_POST['comments'];
checkOK($comments);
$to="[email protected]";
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From mi pagina web",$message,"From: $email\n")) {
echo "Thanks for your comments, we`ll answer you soon. /
Gracias por enviarnos su consulta, a la brevedad le responderemos / Thank you, we´ll answer you soon";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mi pagina web</title>
</head>
<body>
</body>
</body>
</html>