<?php
	ob_start();
	$name = $_POST['name'];
	$email = $_POST['email'];
	$phone = $_POST['phone'];
	
	$message = $_POST['message'];
	
	require("Mail/class.phpmailer.php");
	require("Mail/class.smtp.php");
					 
	$FromEmail	=	$email;
	$ToEmail	=	'info@luisantsoftwares.com';
	$Subject	=	'Enquiry';
	$FromName	=	$name;
	
	$Message 	= 	'<table width="760px" border="1" cellpadding="0" cellspacing="0" style="background-color: #E4F3FA;"><tr><td align="center" style="font-weight: bold; padding: 6px;">Name</td><td style="padding: 6px;">'.$name.'</td></tr><tr><td align="center" style="font-weight: bold; padding: 6px;">Email Address</td><td style="padding: 6px;">'.$email.'</td></tr><tr><td align="center" style="font-weight: bold; padding: 6px;">Phone Number</td><td style="padding: 6px;">'.$phone.'</td></tr><tr><td align="center" style="font-weight: bold; padding: 6px;">Message</td><td style="padding: 6px;">'.$message.'</td></tr></table>'; 
	
	$mail = new PHPMailer();
					 
	$mail->From     = $FromEmail;
	$mail->FromName = $FromName;
					 
	$mail->Sender   =  $FromEmail;
	$mail->ConfirmReadingTo  = $FromEmail;
					 
	$mail->AddReplyTo($FromEmail);
					
	$mail->IsHTML(true);
	
	$mail->Subject = $Subject;
				
	$mail->Body     =  $Message;
	$mail->AltBody  =  "ALTERNATIVE MESSAGE FOR TEXT WEB BROWSER LIKE SQUIRRELMAIL";
					 
	$mail->AddAddress($ToEmail,$ToEmail);
			
	if($mail->Send())
	{
		 
		echo '<script language="javascript">alert("Mail Sent Successfully");location.href=\'' . $_SERVER['HTTP_REFERER'] . '\'</script>';
		
		 
	}
?>