Skip to content

Instantly share code, notes, and snippets.

@georgeguimaraes
Created September 22, 2010 05:28
Show Gist options
  • Save georgeguimaraes/591202 to your computer and use it in GitHub Desktop.
Save georgeguimaraes/591202 to your computer and use it in GitHub Desktop.
<?php
if(isset($_POST['email'])) {
$to = "[email protected]";
$subject = "Contato";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Telefone: $phone\n Mensagem:\n $message";
$from = "From: $email_field";
mail($to, $subject, $body, $from);
echo "Seu contato foi enviado!";
} else {
echo ".";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment