Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/06/2011, 18:05
serch_sgc
 
Fecha de Ingreso: octubre-2008
Ubicación: Mexico
Mensajes: 38
Antigüedad: 15 años, 6 meses
Puntos: 1
Prroblema con phpmailer y gmail

Hola amigos, estoy utilizando phpmailer en mi sitio para el envio de email, este lo he probado localmente y funciona a la perfeccion y llega bien el el mensaje al correo, pero ocurre lo contrario en el servidor, aqui me avienta el siguiente error:
SMTP -> ERROR: Failed to connect to server: Connection timed out (110) php mailer
no se lo que puede ser, la version del php en el servidor es el 5.2.14 y tiene habilitado el SSL, la version de ssl: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008.
Aqui les pongo el codigo.
include("phpmailer/class.phpmailer.php");
try {
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com"; // SMTP server
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure= "ssl"; // sets the prefix to the servier
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // GMAIL username
$mail->Password = "micontraseña"; // GMAIL password
$mail->AddAddress("[email protected]";
$mail->Subject='probando';
$mail->FromName="probando con phpmailer";
$mail->Timeout=30;
$html=' // codigo html';
$mail->MsgHTML($html);
$mail->Send();

Espero me puedan ayudar, de antemano muchas gracias.
Saludos.