<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>


<?php 
$rec_sendername=$_POST['sendersname'];
$rec_senderemail=$_POST['sendersemail'];
$rec_receiveremail=$_POST['receiveremail'];
$rec_subject=$_POST['subject'];
$rec_message=$_POST['message'];



if(empty($rec_senderemail)||empty($rec_receiveremail)||empty($rec_subject)||empty($rec_message)){
	echo "Please fill in all the forms"; 
include "email.php";

}



else {
mail($rec_receiveremail,$rec_subject,"Email from : $rec_sendername ". $rec_message, "From : $rec_senderemail" );

echo "Email sent sucessfully.<br>"; 

echo " Receiver email : $rec_receiveremail<br>";
echo "Subject :$rec_subject<br>";

echo " From :$rec_sendername<br>";
echo " Message :$rec_message<br>";


}



?>



</body>
</html>