mail function is used to send Email in PHP
mail($to,$subject,$message,$header);
mail function have following argument
1. $to , email address where mail sent to
2. $subject , email subject
3. $message , email message body
4. $header , mail header (optional)
$headers = 'From: support@example.com' . "\r\n" .
'Reply-To: support@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$subject="Contact Us from eXample.com ";
$message="Name :: ".$_REQUEST['name']." \n";
$message.="Email :: ".$_REQUEST['email']." \n";
$message.="Message :: ".$_REQUEST['message']."\n";
$admin_email="dilip.bakotiya@gmail.com";
if(mail($admin_email,$subject,$message,$headers)){
$mailsent=1;
}