buenas!!
ya la eh revisado
y ya cambie el nombre de usuario como me dice y tambien el puerto
ahora... no me marca error pero tampoco lo envia
que puede ser??
aqui esta el codigo modificado del test
Código:
<?php
//error_reporting(E_ALL);
error_reporting(E_STRICT);
date_default_timezone_set('America/Toronto');
require_once('class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
$mail = new PHPMailer();
$body = file_get_contents('contents.html');
$body = eregi_replace("[\]",'',$body);
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.gmail.com"; // SMTP server
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "smtp.gmail.com"; // sets the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // SMTP account username
$mail->Password = "XXXXXXXXXXXX"; // SMTP account password
$mail->SetFrom('[email protected]', 'First Last');
$mail->AddReplyTo("[email protected]","First Last");
$mail->Subject = "Probando el Envio de Correo";
$mail->AltBody = "Esta es una prueba de Envio de Correo!"; // optional, comment out and test
$mail->MsgHTML($body);
$address = "[email protected]";
$mail->AddAddress($address, "SIREG");
$mail->AddAttachment("images/phpmailer.gif"); // attachment
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
?>
un saludo!!