<?php
if($to!="")
{
	$mail = new PHPMailer();
	$mail->IsSMTP();                                   // send via SMTP
	$mail->Host     = "mail.theyashacademy.com"; // SMTP server
	$mail->SMTPAuth = true;     // turn on SMTP authentication
	$mail->Username = "noreply@theyashacademy.com";  // SMTP username
	$mail->Password = "v6PW-=1VSG(D"; // SMTP password
	$mail->From     = "noreply@theyashacademy.com";
	$mail->FromName = "The Yash Academy";                    
     $mail->SMTPSecure = 'tls';                    
     $mail->Port = 587;   
	$mail->IsHTML(true); 
	
	$mail->AddAddress($to);
    $mail->addBCC('rajatdh07@gmail.com');
	$mail->AddReplyTo("noreply@theyashacademy.com");
	
	$mail->WordWrap = 100;      // set word wrap
	//$mail->AddAttachment($file_name);                         // attachment
	$mail->IsHTML(true);                               // send as HTML
	$mail->Subject  =  $subject;
	$mail->Body   =  $message;
	
	 //temp disable
	if(!$mail->Send())
	{
	echo "Message was not sent";
	echo "Mailer Error: " . $mail->ErrorInfo;
	exit;
	}
	else
	{
	//echo "Message was sent";
	}
	unlink($file_name);
	

} ?>