He utilizado un mailer.php para mis formularios y siempre anduvo de maravilla y ahora me encuentro conque a un cliente no le estan llegando mails y sinceramente no se porque, a vr si me pueden hechar una manito....
les dejo el código HTML del form:
Código HTML:
<form name="f1" action="mailer.php" method="post"> <table width="100%" class="tablas"> <tr> <td width="250" class="tablasIzq">Nombre:</td> <td width="860" ><input name="nombre" type="text" id="nombre" size="25" maxlength="50" class="Formularios" /> <span style="color: #8DAB00;">*</span></td> </tr> <tr> <td width="180" class="tablasIzq">Apellido:</td> <td ><input name="apellido" type="text" id="apellido" size="25" maxlength="50" class="Formularios" /> <span style="color: #8DAB00;">*</span></td> </tr> <tr> <td width="180" class="tablasIzq">Empresa:</td> <td ><input name="empresa" type="text" id="empresa" size="25" maxlength="50" class="Formularios" /></td> </tr> <tr> <td width="180" class="tablasIzq">Cargo que Ocupa:</td> <td ><input name="cargo" type="text" id="cargo" size="25" maxlength="50" class="Formularios" /></td> </tr> <tr> <td width="180" class="tablasIzq">Dirección:</td> <td ><input name="direccion" type="text" id="direccion" size="25" maxlength="50" class="Formularios" /></td> </tr> <tr> <td width="180" class="tablasIzq">Teléfono<br> <span style="font-size: 10px;">(adjuntar código de área)</span>:</td> <td ><input name="telefono" type="text" id="telefono" size="25" maxlength="50" class="Formularios" /></td> </tr> <tr> <td width="180" class="tablasIzq">E-mail:</td> <td ><input name="mail" type="text" id="mail" size="25" maxlength="15" class="Formularios" /> <span style="color: #8DAB00;">*</span></td> </tr> <tr> <td width="180" class="tablasIzq">Ciudad:</td> <td ><input name="ciudad" type="text" id="ciudad" size="25" maxlength="50" class="Formularios" /> <span style="color: #8DAB00;">*</span></td> </tr> <tr> <td width="180" class="tablasIzq">Pais:</td> <td ><input name="pais" type="text" id="pais" size="25" maxlength="50" class="Formularios" /> <span style="color: #8DAB00;">*</span></td> </tr> <tr> <td width="180" class="tablasIzq">Código Postal:</td> <td ><input name="codigo_postal" type="text" id="codigo_postal" size="25" maxlength="50" class="Formularios" /> <span style="color: #8DAB00;">*</span></td> </tr> <tr> <td width="180" class="tablasIzq">¿Cómo nos contacto?:</td> <td > <select name="como_nos_contacto" size="1" style="font-family: Verdana; font-size: 8pt"> <option selected value=" ">Seleccioneuna opción</option> <option value="publicidad_gráfica">Publicidad Gráfica</option> <option value="buscador_internet">Buscadorde Internet</option> <option value="sitio_web">Por nuestro sitio web</option> <option value="referencias">Referenciasde conocidos</option> <option value="otro">Otros</option> </select> </td> </tr> </table> <h4>¿En cúal de nuestros productos esta interesado?</h4> <table width="100%" class="tablas"> <tr> <td width="350" class="tablasIzq">Tabiques y Cielorrasos:</td> <td width="860" ><input type="checkbox" name="Producto de interés" value="tabiques_cielorrasos"></td> </tr> <tr> <td width="380" class="tablasIzq">Cielorrasos Termoacústicos:</td> <td ><input type="checkbox" name="Producto de interés" value="termoacisticos"></td> </tr> <tr> <td width="180" class="tablasIzq">Pisos de Goma y Vinílicos:</td> <td ><input type="checkbox" name="Producto de interés" value="vinilicos"></td> </tr> <tr> <td width="180" class="tablasIzq">Pisos Flotantes, Linóleum:</td> <td ><input type="checkbox" name="Producto de interés" value="linoleum"></td> </tr> <tr> <td width="180" class="tablasIzq">Otros:</td> <td ><input type="checkbox" name="Producto de interés" value="otros"></td> </tr> </table> <h4>Observaciones</h4> <table width="100%" class="tablas"> <tr> <td width="250" valign="top" class="tablasIzq">Orsevaciones:</td> <td width="860" ><textarea name="Comentario" cols="45" rows="6"></textarea></td> </tr> </table> <table width="100%" class="tablas"> <tr> <td width="850" class="tablasDerecha" style="padding: 5px;"> <a href="javascript:validar();"><img src="imagenes/btn-enviar.gif" alt="Enviar" border="0"></a><br> <br> <a href="javascript:document.f1.reset();"><img src="imagenes/btn-limpiar.gif" alt="Limpiar" border="0"></a> </td> </tr> </table> </form>
Código PHP:
<?PHP
$to = "[email protected]";
$subject = "Contacto desde Web";
$headers = "From: Web Site Secobras";
$forward = 0;
$location = "";
$date = date ("j/m/y");
$time = date ("G a");
$msg = "Correo enviado desde Web Site el día $date a las $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
header("Location: ok.html");
}
?>
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
Gracias!!!!