<?php 
if(isset($_POST))
{
	
	$name=trim($_POST['name']);	
	$email=trim($_POST['email']);	
	$phone=trim($_POST['phone']);
	$company=trim($_POST['company']);
	$interested=trim($_POST['interested']); 
	$message=trim($_POST['message']);
	
			$Message="<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" align=\"center\">				
						<tr>
							  <td width=\"25%\" align=\"left\" style=\"font-size:16px; font-weight:bold;\">Name : &nbsp;</td>
							  <td  align=\"left\" style=\"font-size:16px; padding-left:10px;\">$name</td>
						</tr>
						<tr>
							  <td width=\"25%\" align=\"left\" style=\"font-size:16px; font-weight:bold;\">Company : &nbsp;</td>
							  <td  align=\"left\" style=\"font-size:16px; padding-left:10px;\">$company</td>
						</tr>
						<tr>
							  <td width=\"25%\" align=\"left\" style=\"font-size:16px; font-weight:bold;\">Email : &nbsp;</td>
							  <td  align=\"left\" style=\"font-size:16px; padding-left:10px;\">$email</td>
						</tr>
						<tr>
							  <td width=\"25%\" align=\"left\" style=\"font-size:16px; font-weight:bold;\">Phone : &nbsp;</td>
							  <td  align=\"left\" style=\"font-size:16px; padding-left:10px;\">$phone</td>
						</tr>
						<tr>
							  <td width=\"25%\" align=\"left\" style=\"font-size:16px; font-weight:bold;\">Interested In : &nbsp;</td>
							  <td  align=\"left\" style=\"font-size:16px; padding-left:10px;\">$interested</td>
						</tr>
						<tr>
							  <td width=\"25%\" align=\"left\" style=\"font-size:16px; font-weight:bold;\">Message : &nbsp;</td>
							  <td  align=\"left\" style=\"font-size:16px; padding-left:10px;\">$message</td>
						</tr>
					</table>";
		
		
		    $sitename = "Zylotech Admin";
			$toemail = "jiten.kumar@zylotech.com";
			$toemail = "pks0268@gmail.com";
			$admincc = "poojamadnani.freelancer@gmail.com";
			$adminbcc = "pks0268@gmail.com";
			$adminfrom = "jiten.kumar@zylotech.com";
			require ('PHPMailer/class.phpmailer.php');
			$mail = new PHPMailer();
			// $mail->IsSMTP();
			$mail->From = $adminfrom;
			$mail->FromName = $sitename;
			$mail->AddReplyTo($email,$name);
			//$mail->Host = 'mail.demo.com';
			//$mail->SMTPAuth = true; 
			//$mail->Username = '';
			//$mail->Password = ''; 
			
			
			$mail->AddAddress($toemail, $sitename);
			$mail->AddCC($admincc, $sitename);
			$mail->AddBCC($adminbcc, $sitename);
			
			if($email!='')
			{
				//$mail->AddAddress($email, "");
			}
			$mail->Subject = "Contact Enquiry from ".$email;
			$mail->Body    =stripcslashes($Message);
		
			$mail->IsHTML(true);
			
			$mail->Send();
			
			$Message2='Dear '.$name.',<br /> Appreciate your interest. We will reach back to you pretty soon on the contact information you provided.<br /> <br /> 
			Until then, you can also check out following resources:<br />
            zylotech Blog: https://zylotech.com/blog/ <br />
			Connect to our Twitter handle: https://twitter.com/zylotweet <br />
			Go back to our site: https://zylotech.com/<br />
			           <p>Regards<br />
					   '.$sitename.'<br />
					   '.$_SERVER['HTTP_HOST'].'
					   </p>';
			$mail2 = new PHPMailer();
			$mail2->From = $adminfrom;
			$mail2->FromName = $sitename;
			$mail2->AddReplyTo($adminfrom,$sitename);
			//$mail2->Host = 'mail.demo.com';
			//$mail2->SMTPAuth = true; 
			//$mail2->Username = '';
			//$mail2->Password = ''; 
			
			$mail2->AddAddress($email, $sitename);
			
			if($email!='')
			{
				//$mail2->AddAddress($email, "");
			}
			$mail2->Subject = "Contact Enquiry successfully submited.";
			$mail2->Body    =stripcslashes($Message2);
		
			$mail2->IsHTML(true);
			
			if($mail2->Send())
			{
				echo "1";
			}
			else
			{
				echo "0";
			}

	
}

?>