Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/12/2011, 14:55
Avatar de Patriarka
Patriarka
 
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 3 meses
Puntos: 288
problema phpmailer

Hola gente, tengo un problema comun:

Código PHP:
Ver original
  1. require_once('class.phpmailer.php');
  2. $mail             = new PHPMailer();
  3. $body             = $message;
  4. $body             = eregi_replace("[\]",'',$body);
  5. $mail->IsSMTP(); // telling the class to use SMTP
  6.  
  7. // $mail->SMTPDebug  = 2;                  
  8. // enables SMTP debug information (for testing)
  9. // 1 = errors and messages
  10. // 2 = messages only
  11.  
  12. $mail->SMTPAuth   = true;                  // enable SMTP authentication
  13. $mail->SMTPSecure = "ssl";                 // sets the prefix to the server
  14. $mail->Host       = SMTP_HOST;   //[B]smtp.gmail.com[/B]       // sets SMTP server HOST name
  15. $mail->Port       = 465;                   // set the SMTP port for the server
  16. $mail->Username   = SMTP_USERNAME;         // SMTP username
  17. $mail->Password   = SMTP_PASSWORD;         // SMTP password
  18. $mail->SetFrom(FROM_EMAIL, utf8_decode(FROM_NAME));
  19. $mail->AddReplyTo(REPLY_TO_EMAIL,utf8_decode(REPLY_TO_NAME));
  20. $mail->Subject    = utf8_decode($subject);
  21. $mail->AltBody    = "Para ver este mensaje, por favor use un cliente compatible con HTML!"; // optional, comment out and test
  22. $mail->MsgHTML(utf8_decode($body));
  23. $mail->AddAddress(SITE_EMAIL, APP_NAME);
  24. $mail->Send();

y el error es este: Mailer Error: SMTP Error: Could not connect to SMTP host.
en el server de desarrollo funciona y online no!
son los mismos datos y el hosting es bluehost.
que puede ser?