<?php 


$name =  $_POST['name'];
$email = $_POST['email'];
// $subject = $_POST['subject'];
$phone = $_POST['phone'];
$message = $_POST['message'];


$To = "thejas996@gmail.com";

	$DateOf = Date('d/m/y');
	$MailSubject = "Contact Us Request ($DateOf)";
	
	$headers = "MIME-Version: 1.0" . "\r\n";
	$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
	$headers .= "From: karan.singh@srsjuris.in" . "\r\n" .
                   "CC: karan.singh@srsjuris.in"."\r\n". "Reply-To: $To";
			    
	
	$Message = "
	<html>
                   <body>
                       <div style='width:98%;border:1px solid black;padding:1%;background:#F9F7F9;font-family:Kalam;letter-spacing:1px;'>
                           <div style='width:90%;padding:5%;'>
                           <img src='https://dakshainteriorservices.in/srlawer/index.php' style='height:100px;'> 
                               <h2 style='font-family:Kalam;'>Contact Us Request</h2>
                               <P>
                                   
							   Your Name: <span style='font-weight:bold;'>$name</span><br>
							   Your Email: <span style='font-weight:bold;'>$email</span><br>
							   Contact Number: <span style='font-weight:bold;'>$phone</span><br>
							   Message: <span style='font-weight:bold;'>$message</span><br>
							        
                               </P>
                           </div>
                       </div>
                   </body>
                   </html>
		";
	
		
		$Mail = mail($To, $MailSubject, $Message, $headers);
		
		if($Mail){

            header("refresh: 0.001; url=contact.php?status=success");
		
		}

        else {
            header("refresh: 0.001; url=contact.php?status=error");
        }


?>