<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_message = $_POST['message'];

if( $contact_name == true )
{
	// get sender mail
	$sender = $contact_email;
	// add your receiver mail 
	$receiver = "youremail@yourdomain.com";
	// get sender ip
	$client_ip = $_SERVER['REMOTE_ADDR'];
	// mail content
	$email_body = "Name: $contact_name \nEmail: $sender \n\nMessage: \n\n$contact_message \n\nIP: $client_ip";		
	$extra = "Content-type: text/plain; charset=UTF-8\r\n" . "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
	// mail send state
	if( mail( $receiver, "Obright XML Templage Form", $email_body, $extra ) ) 
	{
		echo "success=yes";
	}
	else
	{
		echo "success=no";
	}
}
?>