Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/10/2010, 09:54
Avatar de cristian_db
cristian_db
 
Fecha de Ingreso: julio-2009
Mensajes: 105
Antigüedad: 14 años, 9 meses
Puntos: 4
Respuesta: problema para enviar mail

el codigo del form es


Código HTML:
Ver original
  1. <form method="post" action="enviarMail.php">
  2. nombre <input type="text" name="nombre">
  3. mail <input type="text" name="mail">
  4. <textarea name="mensaje" rows="9" cols="65"></textarea>
  5. <input type="submit" value="Enviar">
  6. </form>

y el enviarMail.php es

Código PHP:
Ver original
  1. <?php
  2.  
  3. $nombre_origen    = "".$_POST["nombre"]."";
  4. $email_origen     = "[email protected]";
  5. $email_copia      = "[email protected]";
  6. $email_ocultos    = "[email protected]";
  7. $email_destino    = "".$_POST["mail"]."";
  8.  
  9. $asunto           = "Carta especial a usuarios";
  10.  
  11. $mensaje          ="".$_POST["mensaje"]."";
  12.  
  13. $formato          = "html";
  14.  
  15. //*****************************************************************//
  16. $headers  = "From: $nombre_origen <$email_origen> \r\n";
  17. $headers .= "Return-Path: <$email_origen> \r\n";
  18. $headers .= "Reply-To: $email_origen \r\n";
  19. $headers .= "Cc: $email_copia \r\n";
  20. $headers .= "Bcc: $email_ocultos \r\n";
  21. $headers .= "X-Sender: $email_origen \r\n";
  22. $headers .= "X-Mailer: [Habla software de noticias v.1.0] \r\n";
  23. $headers .= "X-Priority: 3 \r\n";
  24. $headers .= "MIME-Version: 1.0 \r\n";
  25. $headers .= "Content-Transfer-Encoding: 7bit \r\n";
  26. $headers .= "Disposition-Notification-To: \"$nombre_origen\" <$email_origen> \r\n";
  27. //*****************************************************************//
  28.  
  29. if($formato == "html")
  30.  { $headers .= "Content-Type: text/html; charset=iso-8859-1 \r\n";  }
  31.    else
  32.     { $headers .= "Content-Type: text/plain; charset=iso-8859-1 \r\n";  }
  33.  
  34. if (@mail($email_destino, $asunto, $mensaje, $headers))
  35.     {
  36.  
  37.  
  38.  echo "Ya  se ha enviado el email"; }
  39.      else
  40.     {  echo "Error en el envio de el email"; }
  41.      
  42.  
  43. ?>

y me aparece "Ya se ha enviado el email" pero no envio nada....sera problema del cambio de dominio?

Última edición por cristian_db; 30/10/2010 a las 10:13