<?php
include("phpmailerscript/class.phpmailer.php");
include("phpmailerscript/class.smtp.php"); // note, this is optional - gets called from main class if not already loaded

$mail             = new PHPMailer();

$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
$mail->Port       = 465;                   // set the SMTP port

$mail->IsSendmail();

$mail->Username   = "shrinetrainfotech";  // GMAIL username
$mail->Password   = "pradoshsoni";            // GMAIL password

$mail->From       = "shrinetrainfotech@gmail.com";
$mail->FromName   = "Administrator";

$mail->addCustomHeader("Content-Type: text/plain; Content-Type: text/html; Content-Transfer_Encoding: 7bit\r\n\r\n");
$mail->Subject    = "This is the subject";
$mail->Body		  = "This is the body when user views in plain text format"; //Text Body	
$mail->AltBody    = "This is the body when user views in plain text format"; //Text Body
$mail->WordWrap   = 50; // set word wrap
$mail->AddAddress("pradosh.soni@gmail.com","First Last");
//$mail->AddAttachment("Blue hills.jpg");             // attachment


$mail->Send();



if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message has been sent";
}				
?>