0){
$email_message .= “Product: “.$product.”n”;
}

$email_message .= “Name: “.clean_string($name).”n”;

$email_message .= “Job Title: “.clean_string($title).”n”;

$email_message .= “Company: “.clean_string($company).”n”;

$email_message .= “Street: “.clean_string($street).”n”;

$email_message .= “City & State/Province: “.clean_string($cityState).”n”;

$email_message .= “Zip/Post Code: “.clean_string($postcode).”n”;

$email_message .= “Country: “.clean_string($country).”n”;

$email_message .= “Email: “.clean_string($email_from).”n”;

$email_message .= “Telephone: “.clean_string($phoneNumber).”n”;

$email_message .= “Message: “.clean_string($message).”n”;

// create email headers

$headers = ‘From: ‘.$emailFrom.”rn”.

‘Reply-To: ‘.$emailFrom.”rn” .

‘X-Mailer: PHP/’ . phpversion();

if (mail($email_to, $email_subject, $email_message, $headers)){
$response[‘success’] = “Thank you “. $name .”, for contacting us”;
echo json_encode($response);
}else{
$error[‘server’] = ‘There was an issue with our form, please try again later’;
$errors[‘errors’] = $error;
echo json_encode($errors);
}

}else{
$errors[‘errors’] = $error;
echo json_encode($errors);
}

}
?>