<?php
session_start();
if(!isset($_SESSION['user'])) {
	header("location: ../index.php");
	exit;
}

// include "../dbconnect.php";
include("class.phpmailer.php");
include("class.smtp.php");

	

/*$mail = new PHPMailer(); 
$mail->IsSMTP();                                     
$mail->Host = "host.garudaerp.com"; 
$mail->SMTPAuth = true;    
$mail->Username = "bholanath@solutionzconsulting.com"; 
$mail->Password = "bholanath@";   
$mail->From = "SCPL";
$mail->FromName = "Bhola Nath Saha";
$mail->Sender = "bholanath@solutionzconsulting.com";
$mail->IsHTML(true);
$mail->Subject = "testing";
$mail->Body    = "test mail by default"; 
$mail->AddAddress('bholanath@solutionzconsulting.com');
if(!$mail->send()) {
	echo 'Message could not be sent.';
	echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
	echo 'Message has been sent';
}*/

$from = 'bholanath@pugdundeesafaris.com';
$to1 = 'bholanath@solutionzconsulting.com';
$body = 'testing mail by bholanath';

$mail = new PHPMailer(); 
$mail->IsSMTP();
$mail->Host = "host.solutionzconsulting.in";
$mail->SMTPAuth = true;
$mail->Username = "webform@pugdundeesafaris.com";
$mail->Password = "ZZwydV20[UVV";
$mail->From = $from;
$mail->FromName = "Bhola Nath Saha";

$mail->AddAddress($to1);
$mail->IsHTML(true);
$mail->Subject = $sub;
$mail->Body    = $body;
if(!$mail->send()) {
	echo 'Message could not be sent.';
	echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
	echo 'Message has been sent';
}
