Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/lms/
Upload File :
Current File : /var/www/html/mmishra/indem/lms/romail.php

<?php
require("classes/PHPMailerAutoload.php");
require("classes/class.phpmailer.php");

$tbl2 = 'leaveRegister';

$msg = "Acknowledgement of Leave Application Received !

Dear Sir,

A leave application received is pendeing for your needful approval. Please click on the below link. 

\n ";

//--------------------------------------------------------------------------
require("classes/class.smtp.php");
$rs1 = mysql_query("select recomemail from $tbl2 where id=$id");
while ($o1 = mysql_fetch_object($rs1)) {
	$email1 = $o1->recomemail;
}	
	/*if (checkEmail($email) == FALSE) {
		echo "<div align='right'>$email</div>";
		//continue;
	} else {*/
//---------------------------------------------------------------------------
		$mail = new PHPMailer();
		//$mail->SMTPDebug = 4; //telling the class to run SMTP in debug mode
		$mail->IsSMTP(); // telling the class to use SMTP
                $mail->CharSet="UTF-8";
                //Whether to use SMTP authentication
                $mail->SMTPAuth = true;
                $mail->SMTPSecure = 'ssl';
                $mail->Host = 'smtp.gmail.com';
                $mail->Port = 465;
		$mail->FromName = "Prashant";
		$mail->From = "prashantkr@iiita.ac.in";
		$mail->Username = "prashantkr@iiita.ac.in";
		$mail->Password = "cutepie2015";
		//$mail->WordWrap = 80;
		$mail->Subject = "Online Leave Application";
		$mail->AddAddress("prashantkr@iiita.ac.in","prashantkr@iiita.ac.in");
		$mail->AddAddress("$email1","$email1");
		//$mail->AddCC("dr.a@iiita.ac.in","dr.a");
		//$mail->AddAttachment("invitation09.jpg","invitation09.jpg");


$link = "http://website.iiita.ac.in/lms/recommendation.php?appid='$appid'";


/*		$i = 0;
		//$rs = mysql_query("select * from $tbl2 where id=$id");
		$rs = mysql_query("select appid from $tbl2 where id=$id");
		$o = mysql_fetch_array($rs);
		while ($i < mysql_num_fields($rs)) {
			$msg .= strtoupper(mysql_field_name($rs, $i)) . ": ";
			if ($o[$i]) $msg .= $o[$i];
			else $msg .= 'UPDATING SOON';
			$msg .= "\n"; 
			$i++;
		}
*/

$msg = $msg . $link;

$msg = $msg . " -
Thanks
Personnel Department
IIIT-Allahabad";

		$mail->Body = $msg;
		if (!$mail->Send()) {
			echo "Mail could not be sent\n Mailer Error: " . $mail->ErrorInfo;
		} else {
			//echo "<pre style='font-size:11px'>$msg</pre>";
		}

		//echo "<pre style='font-size:11px'>$no. $email</pre>";
	//}
//}
?>