Hola gente, tengo un problema comun:
Código PHP:
Ver originalrequire_once('class.phpmailer.php');
$mail = new PHPMailer();
$body = $message;
$mail->IsSMTP(); // telling the class to use SMTP
// $mail->SMTPDebug = 2;
// enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the server
$mail->Host = SMTP_HOST; //[B]smtp.gmail.com[/B] // sets SMTP server HOST name
$mail->Port = 465; // set the SMTP port for the server
$mail->Username = SMTP_USERNAME; // SMTP username
$mail->Password = SMTP_PASSWORD; // SMTP password
$mail->AddReplyTo(REPLY_TO_EMAIL
,utf8_decode(REPLY_TO_NAME
)); $mail->AltBody = "Para ver este mensaje, por favor use un cliente compatible con HTML!"; // optional, comment out and test
$mail->AddAddress(SITE_EMAIL, APP_NAME);
$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?