<?php
 
//require_once('class.phpmailer.php');
require_once('PHPMailerAutoload.php');
 
$correo = new PHPMailer();
 
$correo->IsSMTP();
$correo->SMTPDebug = 3;
 
$correo->SMTPAuth = true;
 
$correo->SMTPSecure = 'tls';
 
$correo->Host = "smtp.gmail.com";
 
$correo->Port = 587;
 
$correo->Username   = "caroll231g@gmail.com";
 
$correo->Password   = "152634485967";
 
$correo->SetFrom("caroll231g@gmail.com", "Mi Codigo PHP");
 
$correo->AddReplyTo("caroll231g@gmail.com","Mi Codigo PHP");
 
$correo->AddAddress("caroll8_@hotmail.com", "Caroll");
 
$correo->Subject = "Mi primero correo con PHPMailer";
 
$correo->MsgHTML("Mi Mensaje en <strong>HTML</strong>");
 
//$correo->AddAttachment("examples/images/phpmailer.gif");
 
if(!$correo->Send()) {
  echo "Hubo un error: " . $correo->ErrorInfo;
} else {
  echo "Mensaje enviado con exito.";
}
 
?>