<?php
if(isset($_POST))
{ 
$name=trim($_POST['fname']);	
$email=trim($_POST['email']);
$phone=trim($_POST['phone']);
$message=trim($_POST['message']);
$queryurl=trim($_POST['url']);
	
$Message="<h3>Query Form :-".$queryurl."</h3>
<table class='gmail-table gmail-table-striped' style='box-sizing: inherit; border-collapse: collapse; background-color: transparent; width: 844px; max-width: 100%; margin-bottom: 20px; color: rgb(0, 0, 0); font-family: Verdana, sans-serif; font-size: 15px;'>
<thead style='box-sizing: inherit;'></thead>
<tbody style='box-sizing: inherit;'>	
<tr style='box-sizing: inherit; background-color: rgb(249, 249, 249);'>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>First Name</td>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>".$name."<br></td>
</tr>
<tr style='box-sizing: inherit; background-color: rgb(249, 249, 249);'>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>Email ID:</td>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>".$email."<br></td>
</tr>	
<tr style='box-sizing: inherit;'>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>Phone:</td>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>".$phone."<br></td>
</tr>	
<tr style='box-sizing: inherit; background-color: rgb(249, 249, 249);'>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>Message:</td>
	<td style='box-sizing: inherit; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);'>".$message."<br></td>
</tr>	
</tbody>
</table>";
	require ('PHPMailer/class.phpmailer.php');
		$mail = new PHPMailer();
		$mail->From = "info@rubber-siliconemolds.com";
		$mail->FromName = $name;
		$mail->AddReplyTo($email ,$name);
		$mail->AddAddress("raj@westernsoftwares.com");
		$mail->AddBcc("brijeshwesternsoftwares@gmail.com, info@rubber-moldedproducts.com");
		$mail->Subject = "Lead From - Rubber-SiliconeMolds";
		$mail->Body =stripcslashes($Message);
		$mail->IsHTML(true);
		if($mail->Send())
		{
		echo "1";
		}
		else
		{
		echo "0";
		}
}
?>