<?php
require '/Mailer/class.phpmailer.php';
require '/Mailer/class.smtp.php';
$mail = new PHPMailer;
$mail->setFrom('');
$mail->addAddress('me@example.com');
$mail->Subject = 'Message sent by Test';
$mail->Body = 'Hello! This is a TEST';
$mail->IsSMTP();
$mail->SMTPSecure = 'ssl';
$mail->Host = 'ssl://smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Port = 465;
//Set your existing gmail address as user name
$mail->Username = 'example@gmail.com';
//Set the password of your gmail address here
$mail->Password = '*********';
if(!$mail->send()) {
echo 'Email is not sent';
echo 'Email error: ' . $mail->ErrorInfo;
} else {
echo 'Email has been sent.';
}
?>