Created
November 6, 2009 15:41
-
-
Save chadspencer/228048 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$firstname = $_POST['firstname']; | |
$lastname = $_POST['lastname']; | |
$email = $_POST['email']; | |
$phone = $_POST['phone']; | |
$messagesubject = $_POST['messagesubject']; | |
$message = $_POST['message']; | |
$msg .= "First Name: $firstname\n\n"; | |
$msg .= "Last Name: $lastname\n\n"; | |
$msg .= "Email Address: $email\n\n"; | |
$msg .= "Phone: $phone\n\n"; | |
$msg .= "Subject: $messagesubject\n\n"; | |
$msg .= "Message: $message\n\n"; | |
$subject = "Form Submission From Departika"; | |
$to = "[email protected]"; | |
$from = "[email protected]"; | |
$mailheaders = "From: departika.com <$from>\n"; | |
$mailheaders .= "Reply-To: $email\n\n"; | |
$success = mail($to, $subject, $msg, $mailheaders); | |
if ($success) | |
header("Location: /contact/thanks/"); | |
else | |
echo "An error occurred when sending the email to [email protected]. Please contact us directly."; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment