Tengo un sitio alojado en Godaddy en un servidor compartido. Dentro del mismo tengo una pagina de contacto con un formulario de contacto (ajax + php).
Problema: Hay dias en los que la mitad de los mails no llegan, esto lo probe llenando yo el formulario varias veces al dia y fijandome si eran recibidos o no.
Pregunta: ¿Adonde puede estar el problema? ¿En el servidor, en el script o en el servidor de correo?
Ya me comunique con Godaddy pero no creo que me ayuden mucho.
Html:
Código HTML:
 <div id="formulario"> <form action="" name="formulariocontacto" id="formulariocontacto" style="margin:0px"> <h2 id="titulo-contactanos"> <span>Formulario de contacto</span> </h2> <div> <p> <label for="cname" >Nombre: </label> <input name="name" type="text" class="text required nombre" id="cname" tabindex="10" onkeyup="checkNombreForLength(this);" /> </p> <p> <label for="clocalidad" >Localidad: </label> <input name="localidad" type="text" class="text required localidad" id="clocalidad" tabindex="10" onkeyup="checkNombreForLength(this);" /> </p> <p> <label for="cemail" >e-mail:</label> <input name="email" type="text" class="text required email" id="cemail" tabindex="20" onkeyup="checkEmail(this);" /> </p> <label for="ccomment" id="titulo-comentario" >Dejanos tu consulta o comentario:</label> <textarea id="ccomment" name="comment" class="required comentario" cols="60" rows="5" tabindex="30"> </textarea> <input type="submit" class="submit" value="" tabindex="40" /> </div> </form> </div>
Código HTML:
    $(function(){
    $("#formulariocontacto").validate({
    rules: {
          localidad: {required: true},
		  name: {required: true},
          email: {required: true},
          comment: {required: true}
      }, 
   submitHandler: function(form) {       		 
    $.ajax({  
      type: "POST",  
      url: "process.php",  
      data: $(form).serialize(),  
      success: function() {  
        $('#formulario').html("<div id='mensaje'></div>");  
        $('#mensaje').html("<h1></h1>")    
       .hide()  
       .fadeIn(1500, function() {   
       });  
     }  
   });  
   return false;  
}
     });  
   });    
Código PHP:
   <?php
if ((isset($_POST['name'])) && (strlen(trim($_POST['name'])) > 0)) {
    $nombre = stripslashes(strip_tags($_POST['name']));
} else {$nombre = 'No name entered';}
if ((isset($_POST['localidad'])) && (strlen(trim($_POST['localidad'])) > 0)) {
    $localidad = stripslashes(strip_tags($_POST['localidad']));
} else {$localidad = 'No name entered';}
if ((isset($_POST['email'])) && (strlen(trim($_POST['email'])) > 0)) {
    $email = stripslashes(strip_tags($_POST['email']));
} else {$email = 'No email entered';}
if ((isset($_POST['comment'])) && (strlen(trim($_POST['comment'])) > 0)) {
    $comentario = stripslashes(strip_tags($_POST['comment']));
} else {$comentario = 'No phone entered';}
ob_start();
?>
<html>
<head>
<style type="text/css">
</style>
</head>
<body>
<table width="915" border="1" cellspacing="2" cellpadding="2">
  <tr bgcolor="#eeffee">
    <td width="102">Nombre:</td>
    <td width="793"><?=$nombre;?></td>
  </tr>
   <tr bgcolor="#eeffee">
    <td width="102">Localidad</td>
    <td width="793"><?=$localidad;?></td>
  </tr>
  <tr bgcolor="#eeeeff">
    <td>Email</td>
    <td><?=$email;?></td>
  </tr>
  <tr bgcolor="#eeffee">
    <td height="210">Comentario:</td>
    <td><?=$comentario;?></td>
  </tr>
</table>
</body>
</html>
<?
$body = ob_get_contents();
$cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 
mail("[email protected], [email protected]","Formulario recibido",$body,$cabeceras);
?>    
 

