Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/09/2012, 14:13
toyeslomao
 
Fecha de Ingreso: diciembre-2010
Ubicación: tenerife
Mensajes: 60
Antigüedad: 13 años, 4 meses
Puntos: 0
no me llega el correo,

hola chicos, pues eso, tengo un formulario pero no hay manera de que me llegue, deciros que lo ando usando de forma local osea localhost , y uso el xampp con el mercury mail ya configurado, aqui os dejo el codigo a ver si me podeis indicar alguna cosa, eso si deciros que antes me funcionaba no se que pudo pasar

Código HTML:
Ver original
  1. <title>Documento sin título</title>
  2. <script type="text/javascript">
  3. function MM_validateForm() { //v4.0
  4.   if (document.getElementById){
  5.     var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  6.     for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
  7.      if (val) { nm=val.name; if ((val=val.value)!="") {
  8.        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
  9.          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
  10.        } else if (test!='R') { num = parseFloat(val);
  11.          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
  12.          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
  13.            min=test.substring(8,p); max=test.substring(p+1);
  14.            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
  15.      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' es requerido.\n'; }
  16.    } if (errors) alert('ha ocurrido un error:\n'+errors);
  17.    document.MM_returnValue = (errors == '');
  18. } }
  19. </head>
  20.  
  21. <body style="background-color:#00cc66; color: #FFF;">
  22. <table width="455" height="449" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#CCCCCC">
  23.   <tr>
  24.     <th width="451" height="447" scope="col">EL CONSEGUIDOR
  25.  
  26. <table width="412" cellspacing="0" align="center" bgcolor="#009966">
  27.   <tr>
  28.     <th width="408" height="401" scope="col"><input type="hidden" name="form" value="form" /> <form action="recibido1.php" method="POST">
  29.   <p>Nombre:&nbsp;&nbsp;
  30.   <input name="nombre" type="text" id="nombre" />
  31.   </p>
  32.   <p>
  33.     E-mail:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  34.     <input name="mail" type="text" id="mail" onblur="MM_validateForm('mail','','RisEmail');return document.MM_returnValue" />
  35.   </p>
  36.   <p>
  37.     Poblacion :
  38.     <input type="text" name="poblacion" />
  39.   </p>
  40.   <p>Telefono:&nbsp;&nbsp;
  41.   <input type="text" name="telefono" />
  42.   </p>
  43.     <label for="mensaje"><br />
  44.     mensaje<br />
  45.         </label>
  46.       <textarea name="mensaje" id="mensaje" cols="35" rows="8"></textarea>
  47.        <p><input type="reset" value="Borrar" />
  48.     <input type="submit" onclick="MM_validateForm('mail','','RisEmail');MM_validateForm('nombre','','R','mail','','RisEmail');return document.MM_returnValue">
  49.   </p>
  50. </form>
  51.       <div align="left">* Campo obligatorio
  52.         </input>
  53.       </div></th>
  54.   </tr>
  55. </th>
  56.   </tr>
  57.  
  58. </body>
  59. </html>

y aqui el codigo PHP

Código PHP:
Ver original
  1. <?php
  2.  
  3.  echo " Nombre:". $_POST['nombre'];
  4.  echo "<br>";
  5.  echo "E-mail:". $_POST['mail'];
  6.  echo "<br>";
  7.  echo "Poblacion:".$_POST['poblacion'];
  8.  echo "<br>";
  9.  echo "Telefono:".$_POST['telefono'];
  10.  echo "<br>";
  11.  echo "Mensaje:".$_POST['mensaje'];
  12.  $header = 'From: ' . $mail . " \r\n";
  13. $header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
  14. $header .= "Mime-Version: 1.0 \r\n";
  15. $header .= "Content-Type: text/plain";
  16.  
  17. $mensaje = "Este mensaje fue enviado por: " . $_POST['nombre'] . ",  " . $empresa . " \r\n";
  18. $mensaje .= "Su e-mail es: " . $_POST['mail'] . " \r\n";
  19. $mensaje .= "Telefono: " . $_POST['telefono'] . " \r\n";
  20. $mensaje .= "Poblacion: " . $_POST['poblacion'] . " \r\n";
  21. $mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
  22. $mensaje .= "Enviado el " . date('d/m/Y', time());
  23.  
  24. $asunto = 'Contacto desde el conseguidor';
  25.  
  26. mail($para, $asunto, utf8_decode($mensaje), $header);
  27.  
  28. echo 'mensaje enviado , muchas gracias';
  29.  
  30.  
  31.   ?>