<?php // This file will take care of sending the email
if(isset($_POST['submit'])) {
$myemail = "You@yoursite.com"; //This is wwhere your email will go
$subject = $_POST['subject'];
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$headers = "From:Contact Form <$myemail>rn";
$headers .= "Reply-To: $name <$email>rn";
echo "Your message has been sent successfully!";
mail($myemail, $subject, $message, $headers);
} else {
echo "An error occurred during the submission of your message";
}
?>
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.