Viewing file: enviaEmail.php (3.91 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//header("Content-Type: text/html; charset=ISO-8859-1",true);
include "load_ipanel.php";
require_once "recaptchalib.php";
// sua chave secreta
$secret = "6LcQUhYUAAAAAPVjMh2OeSXBcbsjhM7qPL57OJ_S";
// resposta vazia
$response = null;
// verifique a chave secreta
$reCaptcha = new ReCaptcha($secret);
// se submetido, verifique a resposta
if ($_POST["g-recaptcha-response"]) {
$response = $reCaptcha->verifyResponse(
$_SERVER["REMOTE_ADDR"],
$_POST["g-recaptcha-response"]
);
}
if ($response != null && $response->success) {
//echo "Olá, " . $_POST["name"] . " (" . $_POST["email"] . "), obrigado por enviar seu formulário!";
$msg = '<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Formulário de Contato</title>
<style type="text/css">
* {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
text-decoration:none;
}
#conteudo {
min-width:300px;
min-height:20px;
margin:auto;
}
#area-contato-email {
min-width:280px;
min-height:20px;
padding:10px;
border:1px #CCCCCC solid;
float:left;
}
.text-cinza-444444 {
color:#444444;
}
.text-cinza-444444-bold {
color:#444444;
font-weight:bold;
}
p {
line-height:18px;
}
</style>
</head>';
$msg.= '<body>
<div>
<a href="http://www.arpenpr.org.br">
<img src="http://www.arpenpr.org.br/images/logo.jpg" border="0" />
</a>
<p style="margin:0px;color:#444;">';
$msg.= "<strong>Formulário de Contato - Site Irpen.org.br</strong></p><br/><br/>";
$emailDestino = "contato@arpenpr.org.br";
$assunto = "Contato";
$msg.= '</p>
<p style="margin:0px; color:#444;">';
$msg.= '<span style="color:#444; font-weight:bold">Nome: </span>'.$_POST['txtNome'].'<br/>';
if($_POST['local'] == "juridico"){
$msg.= '<span style="color:#444; font-weight:bold">Profissão: </span>'.$_POST['txtProfissao'].'<br/>';
$msg.= '<span style="color:#444; font-weight:bold">Cidade/Estado: </span>'.$_POST['txtCidade'].'<br/>';
}
$msg.= '<span style="color:#444; font-weight:bold">Email: </span>'.$_POST['txtEmail'].'<br/>';
$msg.= '<span style="color:#444; font-weight:bold">Telefone: </span>'.$_POST['txtTelefone'].'<br/>';
$msg.= '<span style="color:#444; font-weight:bold">Cartorio: </span>'.$_POST['txtCartorio'].'<br/>';
$msg.= '<span style="color:#444; font-weight:bold">Assunto: </span>'.$_POST['txtAssunto'].'<br/>';
$msg.= '<span style="color:#444; font-weight:bold">Mensagem: </span>'.$_POST['txtMensagem'].'<br/><br/><br/>';
$msg.= '<span style="color:#444; font-weight:bold">IP de Origem: </span>'.$_SERVER["REMOTE_ADDR"].'<br/>';
$msg.= '</p>';
$msg.= '</div>';
$msg.= '</body>';
$msg.= '</html>';
$email = new Email();
$email->addEmail($emailDestino);
$email->addEmail("irpen@mirasistemas.com.br");
$email->setAssunto($assunto);
$email->setNomeRemetente("Site Irpen.org.br");
$email->setMensagem(utf8_decode($msg));
$email->envia();
header("Location: home");
}
?>
|