Seria asi:
Código PHP:
Ver original<?php
require_once('phpMailer/class.phpmailer.php');
require_once("phpMailer/class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
$mail->IsSMTP(); // telling the class to use SMTP
try {
$mail->Host = "smtp.live.com"; // SMTP server
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "smtp.live.com"; // sets the SMTP server
$mail->SMTPSecure = "tls";
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Password = "oscarydiana"; // SMTP account password
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
$mail->MsgHTML("Hola <b>mundo</b>");
$mail->Send();
echo "Message Sent OK<p></p>\n";
} catch (phpmailerException $e) {
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
echo $e->getMessage(); //Boring error messages from anything else!
}
?>
Y habilita el openssl en tu php.ini (php_openssl.dll) y cuando reinicies tu servidor verifica con un phpinfo que este instalado.
Saludos