I want to know what is the error in this scripts this script is sending mails.
<?php
$to = "sufyanaslam234@gmail.com"; // this is your Email address
$name = $_POST['name'];
$email = $_POST['email'];
$date = $_POST['date'];
$phone = $_POST['phone'];
$subject = "New message from Landing Page";
$message = " Name: " . $name . "\r\n\r\n Email Address: " . $email . "\r\n\r\n Test Date Requested: " . $date . "\r\n\r\n Phone Number: " . $phone;
'Reply-To:' . $to . "\r\n" .
'X-Mailer: PHP/' . phpversion();
// Always set content-type when sending HTML email
// $headers = "MIME-Version: 1.0" . "\r\n";
// $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// // More headers
// $headers .= 'From: <webmaster@example.com>' . "\r\n";
// $headers .= 'Cc: myboss@example.com' . "\r\n";
// mail($to,$subject,$message);
mail($to,$subject,$message,$headers);
header('Location: thank-you.html');
?>
Aucun commentaire:
Enregistrer un commentaire