Ver Mensaje Individual
  #12 (permalink)  
Antiguo 12/01/2011, 13:00
Avatar de Heiroon
Heiroon
 
Fecha de Ingreso: junio-2010
Ubicación: Caracas, Venezuela - Por ahora...
Mensajes: 495
Antigüedad: 13 años, 11 meses
Puntos: 63
Respuesta: Envio de formulario por php

fijate.. este es mi codigo.. y lo acabo de probar.. voy a probarlo con la direccion tuya a ver y me dices si te llega correo...

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10.  
  11.  
  12. <form action="" method="post" name="Formulario" id="Formulario">
  13. <fieldset>
  14. <p><label>Nombre <input name="nombre" type="text" id="nombre" size="25" /></label></p>
  15.  
  16. <p><label>Asunto <input name="asunto" type="text" id="asunto" size="20" /></label></p>
  17.  
  18. <p><label>Correo Electronico <input name="mail" type="text" id="mail" size="40" /></label></p>
  19.  
  20. Texto
  21. <p><label><textarea name="consulta" cols="50" rows id="consulta"></textarea>
  22. </label></p>
  23.  
  24. <input name="enviar" type="submit" id="enviar" value="ENVIAR"/>
  25. <input name="Restablecer" type="reset" value="LIMPIAR"/>
  26. </fieldset>
  27. </form>
  28. </body>
  29. </html>
  30.  
  31.  
  32. <?php
  33. $nombre = $_POST['nombre'];
  34. $mail = $_POST['mail'];
  35. $asunto = $_POST['asunto'];
  36.  
  37. $header = 'From: ' . $mail . " \r\n";
  38. $header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
  39. $header .= "Mime-Version: 1.0 \r\n";
  40. $header .= "Content-Type: text/plain";
  41.  
  42. $mensaje = "Este mensaje fue enviado por... " . $nombre . " \r\n";
  43. $mensaje .= "Su e-mail es: " . $mail . " \r\n";
  44. $mensaje .= "Mensaje: " . $_POST['consulta'] . " \r\n";
  45. $mensaje .= "Fue enviado... " . date('d/m/Y', time());
  46.  
  47. $asunto.= $asunto;
  48.  
  49. mail($para,$asunto,utf8_decode($mensaje),$header);
  50. ?>
__________________
Gmail : [email protected]
Twitter: @heiroon

I'm back!