Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (getenv("REQUEST_METHOD") == "POST")
- {
- $nome = $_POST['nome'];
- $email = $_POST['email'];
- $obs = $_POST['mensagem'];
- require_once('PHPMailer/class.phpmailer.php');
- $mail= new PHPMailer;
- $mail->IsSMTP(); // Ativar SMTP
- $mail->SMTPDebug = 2; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas
- $mail->SMTPAuth = true; // Autenticação ativada
- $mail->Host = 'xxxxxx'; // SMTP utilizado
- $mail->Port = 25;
- $mail->Username = 'contato@gmail.com';
- $mail->Password = '';
- $mail->SetFrom('contato@gmail.com');
- $mail->addAddress('contato@gmail.com');
- $mail->addAddress('$email');
- $mail->Subject=("Solicitação");
- $mail->msgHTML("Olá, o cliente $nome, solicitou algumas informacoes <br /><br />
- Nome do solicitante: <b>$nome</b> <br />
- E-mail do solicitante: <b>$email</b> <br />
- OBS: $obs <br /><br />
- Responda o mais breve possivel.");
- if ($mail->send()){
- $ok = true;
- }else{
- $ok = false;
- } }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement