<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "scott@britepencil.com";
$subject = "Contact Form";
$mailheader = "From: $recipient \r\n" . "Reply-To: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
Here is an example of a working PHP script to send mail, which properly utilizes the reply-to header to set your response address, and set's the from address to a user and domain that you control.
Related Articles
Powered by WHMCompleteSolution