Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/03/2010, 17:06
Avatar de cristian_db
cristian_db
 
Fecha de Ingreso: julio-2009
Mensajes: 105
Antigüedad: 14 años, 9 meses
Puntos: 4
Respuesta: Ayuda formulario web

hola, proba con este código para enviar el mail, haber si anda...sino me avisas.
Código PHP:
Ver original
  1. $nombre_origen    =  "".$_POST['nombre']."";
  2. $email_origen     =  "".$_POST['email']."";
  3. $email_copia      =  "".$_POST['email']."";
  4. $email_ocultos    =  "".$_POST['email']."";
  5. $email_destino    =  '[email protected]';
  6.  
  7.  
  8.  
  9. $asunto           = "Comentario";
  10.  
  11. $mensaje          = "".$_POST['msg']."";
  12.  
  13.  
  14.  
  15. $formato          = "html";
  16.  
  17. //*****************************************************************//
  18. $headers  = "From: $nombre_origen <$email_origen> \r\n";
  19. $headers .= "Return-Path: <$email_origen> \r\n";
  20. $headers .= "Reply-To: $email_origen \r\n";
  21. $headers .= "Cc: $email_copia \r\n";
  22. $headers .= "Bcc: $email_ocultos \r\n";
  23. $headers .= "X-Sender: $email_origen \r\n";
  24. $headers .= "X-Mailer: [Habla software de noticias v.1.0] \r\n";
  25. $headers .= "X-Priority: 3 \r\n";
  26. $headers .= "MIME-Version: 1.0 \r\n";
  27. $headers .= "Content-Transfer-Encoding: 7bit \r\n";
  28. $headers .= "Disposition-Notification-To: \"$nombre_origen\" <$email_origen> \r\n";
  29. //*****************************************************************//
  30.  
  31. if($formato == "html")
  32.  { $headers .= "Content-Type: text/html; charset=iso-8859-1 \r\n";  }
  33.    else
  34.     { $headers .= "Content-Type: text/plain; charset=iso-8859-1 \r\n";  }
  35.  
  36. if (@mail($email_destino, $asunto, $mensaje, $headers))
  37.     { echo "Su email a sido correctamente Enviado!";
  38.  
  39. header("index.html");
  40.   }
  41.      else
  42.     {  echo "Error en el envio de el email"; }
  43.  
  44.        
  45.    
  46.         }
  47.       }  
  48.  
  49. ?>

Saludos!!!