
PK 
<?php
// print_r($_POST);
if(isset($_POST['email'])){
$to = "mannductless@gmail.com";
$from = 'info@mannhvacservices.ca';
$first_name = $_POST['name'];
$email = $_POST['email'];
$msg="";
foreach($_POST as $k=>$v){
$msg.=ucfirst($k).": $v \n";
}
$subject = "Feedback/Contact from website mannhvacservices.ca";
$message = $first_name." wrote the following:" . "\n\n".$msg;
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Feedback/Enquiry Sent. Thank you " . $first_name . ", Our team will revert you shortly.";
// You can also use header('Location: thank_you.php'); to redirect to another page.
}
?>


PK 99