Skip to content

Instantly share code, notes, and snippets.

@neves
Forked from anonymous/gist:1129748
Created August 6, 2011 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neves/1129759 to your computer and use it in GitHub Desktop.
Save neves/1129759 to your computer and use it in GitHub Desktop.
<?php
extract($_POST);
var_dump($_POST);
exit;
$subject = "Contato";
$html = "
<html>
<body>
<table width=400 border=0>
<tr>
<td width=100>Nome</td>
<td width=300>$nome</td>
</tr>
<tr>
<td>Cidade</td>
<td>$cidade</td>
</tr>
<tr>
<td>Estado</td>
<td>$estado</td>
</tr>
<tr>
<td>E-mail</td>
<td>$email</td>
</tr>
<tr>
<td>Telefone</td>
<td>$telefone</td>
</tr>
<tr>
<td>Mensagem</td>
<td>$mensagem</td>
</tr>
</table>
</body>
</html>";
$headers = "From: Contato Site <contato@2face.com.br>\r\n";
$headers.= "Content-Type: text/html; charset=ISO-8859-1 ";
$headers.= "MIME-Version: 1.0 ";
if (mail($email_de_envio, $subject, $html, $headers)) {
echo "<script>window.alert('Formulario enviado com sucesso!'); </script>";
echo "<script>window.location = 'index2.php';</script>";
}else{
echo "Ocorreu um erro durante o envio do email.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment