<?php
require("lib/config.php");
require_once 'vendor/eway/eway-rapid-php/include_eway.php';
// =============== Get customer user api ===================================
$data  = $_REQUEST;

// Multiple recipients
$to = 'info@familycab.com.au'; // note the comma
// Subject
$subject = $_REQUEST["subject"];

// Message
$message = $_REQUEST["description"];

$headers = 'From: '.$_REQUEST["email"] . "\r\n" .
    'X-Mailer: PHP/' . phpversion();


 if(mail($to, $subject, $message, $headers))
 {
	$Res["status"] = "OK"; 
	$Res["message"] = "Message Sent to Admin"; 
 }
 else
 {
	$Res["status"] = "error"; 
	$Res["message"] = "Error in sending, please contact us by phone or sms"; 
 }

echo json_encode(new ArrayObject($Res)); 
//echo "<pre>";
//print_r($Res);
//print_r($data);
//echo "</pre>";
$conn->close();
// =============== New customer user api End Here ==========================


?>