Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/06/2010, 11:51
Avatar de Master_raven
Master_raven
 
Fecha de Ingreso: junio-2008
Ubicación: Guatemala City, Guatemala, Guatemala
Mensajes: 95
Antigüedad: 15 años, 10 meses
Puntos: 3
Mail con PHPMailer no funciona

Código PHP:
Ver original
  1. <?php
  2. require_once('class.phpmailer.php');
  3.  
  4. function SendMail($Smail, $NombreUsuario, $Ssub, $SMensa) {
  5.  
  6. try {
  7.     $mail = new PHPMailer(true); //New instance, with exceptions enabled
  8.  
  9.     $body             = $SMensa;
  10.  
  11.  
  12.     $mail->IsSMTP();                           // tell the class to use SMTP
  13.     $mail->SMTPAuth   = true;                  // enable SMTP authentication
  14.     $mail->Port       = 25;                    // set the SMTP server port
  15.     $mail->Host       = "mail.exclusivehosting.net"; // SMTP server
  16.     $mail->Username   = "[email protected]";    // SMTP server username
  17.     $mail->Password   = "password";            // SMTP server password
  18.  
  19.     $mail->IsSendmail();  // tell the class to use Sendmail
  20.  
  21.     $mail->AddReplyTo("[email protected]","QiuBox Guatemala");
  22.  
  23.     $mail->From       = "[email protected]";
  24.     $mail->FromName   = "QiuBox Guatemala";
  25.  
  26.     $to = $Smail;
  27.  
  28.     $mail->AddAddress($to);
  29.  
  30.     $mail->Subject  = $Ssub;
  31.  
  32.     $mail->AltBody    = "Para ver este mensaje, usar compativilidad con HTML, Gracias!"; // optional, comment out and test
  33.     $mail->WordWrap   = 80; // set word wrap
  34.  
  35.     $mail->MsgHTML($body);
  36.  
  37.     $mail->IsHTML(true); // send as HTML
  38.  
  39.     $mail->Send();
  40.     return $e = 'Message has been sent.';
  41. } catch (phpmailerException $e) {
  42.     return $e->errorMessage();
  43. }
  44. }
  45. ?>

ese es el codigo, y el problema es que cuando me lo mando a cuentas de mi server si llegan los correos pero cuando lo mando a gmail, hotmail o yahoo ya no llega nada, si me pudieran ayudar muy agradecido