Skip to content

Instantly share code, notes, and snippets.

@chadspencer
Created November 3, 2009 15:33
Show Gist options
  • Save chadspencer/225121 to your computer and use it in GitHub Desktop.
Save chadspencer/225121 to your computer and use it in GitHub Desktop.
<?php
$msg .= "Name: $name\n\n";
$msg .= "Email Address: $email\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 protected]\n\n";
$success = mail($to, $subject, $msg, $mailheaders);
if ($success)
header("Location: /about/contact/sent");
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