<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once('class.phpmailer.php');
  

$mail             = new PHPMailer();
	//$body             = file_get_contents('test.html');
	//$body             = eregi_replace("[\]",'',$body);
	 
	$mail->IsSMTP(); // telling the class to use SMTP
	$mail->SMTPAuth   = true;                  		// enable SMTP authentication
	$mail->SMTPDebug  = 1;                     		// enables SMTP debug information (for testing)
												   // 1 = errors and messages
												   // 2 = messages only
	$mail->SMTPSecure = "ssl";                 		// sets the prefix to the servier
	$mail->Host       = "smtp.gmail.com";      		// sets MAIL as the SMTP server
	$mail->Port       = 465;                  	 	// set the SMTP port for the GMAIL server
	$mail->Username   = "uomhostel@gmail.com";  	// GMAIL username  
	// Using Gmail APP Password , not gmail password 
	// https://wpmailsmtp.com/gmail-less-secure-apps/#:~:text=Google%20has%20announced%20that%20it's,when%20this%20feature%20is%20disabled.
	$mail->Password   =  "zxvensydlnkiocvm";  			// GMAIL  password
 	//$mail->addReplyTo("support@bandipurreserve.com", 'Support');
	$mail->SetFrom("uomhostel@gmail.com", 'Support');

	 
	$mail->Subject    = "Hostel Registration Form OTP";
	 
$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
	$msg = "<p><strong>Test message.: </p>";
	 
	 

	
	$mail->MsgHTML($msg);
	 
	$mail->AddAddress('poosa.shravan@gmail.com','Shravan');
	//$mail->AddCC("poosa.shravan@gmail.com", "Shravan");
	$mail->Send();

?>

 

   