Código PHP:
Ver original
require_once('phpmailer/class.phpmailer.php'); require_once ('phpmailer/class.smtp.php'); $correo = new PHPMailer(); $correo->IsSMTP(); $correo->isMail(); $correo->Host = "smtp.gmail.com"; $correo->SMTPAuth = true; $correo->SMTPSecure = 'tls'; //tls - ssl $correo->Port = 587; //587 - 465 $correo->SMTPDebug=2; $correo->Password = "*********"; $correo->Subject = "Mi primero correo con PHPMailer"; $correo->MsgHTML("Mi Mensaje en <strong>HTML</strong>"); $correo->isHTML(true); //$correo->AddAttachment("images/phpmailer.gif"); if(!$correo->Send()) { echo "Hubo un error: " . $correo->ErrorInfo; } else { echo "Mensaje enviado con exito."; }