File: /home/cafsindia/.trash/backup/timeoffice/mail.php
<?php
require('../phpmailer/class.phpmailer.php');
$custemail="";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com"; // Your SMTP PArameter
$mail->Port = 587; // Your Outgoing Port
$mail->SMTPAuth = true; // This Must Be True
$mail->Username = ""; // Your Email Address
$mail->Password = ""; // Your Password
$mail->SMTPSecure = 'tls'; // Check Your Server's Connections for TLS or SSL
$mail->From = '';
$mail->FromName = '';
$mail->AddAddress($custemail);
$mail->IsHTML(true);
$mail->Subject="Unpunched Info";
$mail->Body = $html;
$mail=$mail->Send();
echo json_encode(array('sts' => TRUE, 'mode' =>"Mail sent Successfully"));
}else{
echo json_encode(array('sts' => False, 'mode' =>"Server Error!"));
}
?>