<?php
session_start();
$name = $_POST['name'];
$emailid = $_POST['emailid'];
$subject = $_POST['subject'];
$message = $_POST['message'];

$mailto = "info@idyllsourcing.com";
$body = "Contact Us: \n\n -------------------------------------------------\n\n
		Your Name : $name\n
		eMail ID : $emailid\n
		Subject : $subject\n
    	Message : $message\n
-------------------------------------------------";

$subject = "Enquiry from Contact Us";
$headers = 'From: info@notiontech.info';

if(mail($mailto,$subject,$body,$headers))
{
	echo '<script type="text/javascript">
			window.location = "/";
		</script>';
}
else
{
	echo "mail sending failed";
}
?>