I want to send mail using PHPMailer.
I have download phpmailer class form github and I included PHPMailerAutoload.php file to my index.php file.
<?php
require_once('libs/PHPMailer/PHPMailerAutoload.php');
$m = new PHPMailer;
$m->isSMTP();
$m->SMTPAuth = true;
$m->SMTPDebug = 2;
$m->Host = 'smtp.gmail.com';
$m->username = 'manish@example.com';
$m->password = 'example_!@#4';
$m->SMTPSecure = 'ssl';
$m->Port = 465;
$m->From='manish@example.com';
$m->FromName='Manish';
$m->addReplyTo('manish@example.com','Reply Address');
$m->addAddress('manish@example.com','Manish Address');
$m->Subject = 'Here is an Email';
$m->body = 'This is body';
$m->AltBody = 'This is the body osf email';
var_dump($m->send());