Advertisement
Guest User

mail.php

a guest
Aug 16th, 2017
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.04 KB | None | 0 0
  1. <?php
  2.  
  3. $GetPost = filter_input_array(INPUT_POST,FILTER_DEFAULT);
  4.  
  5. $Erro      = true;
  6. $Tipo      = $GetPost['tipo'];
  7. $Nome      = $GetPost['nome'];
  8. $Email     = $GetPost['email'];
  9. $Telefone  = $GetPost['telefone'];
  10. $Cargo     = $GetPost['cargo'];
  11. $Curriculo = $_FILES['curriculo'];
  12. $Mensagem  = $GetPost['mensagem'];
  13.  
  14. include_once 'PHPMailer/class.smtp.php';
  15. include_once 'PHPMailer/class.phpmailer.php';
  16.  
  17. $Mailer = new PHPMailer;
  18. $Mailer->CharSet = "utf8";
  19. $Mailer->SMTPDebug = 1;
  20.  
  21. $Mailer->FromName = "Jogo Digital";
  22. $Mailer->From = "leo@jogo.digital";
  23. $Mailer->AddAddress("renata@jogo.digital");
  24. $Mailer->IsHTML(true);
  25. $Mailer->Subject = "Novo currículo \"Trabalhe Conosco\" - {$Nome}";
  26. $Mailer->AddAttachment($Curriculo);
  27. $Mailer->Body = "
  28. Novo currículo enviado por {$Nome}<br />
  29. Tipo: {$Tipo}<br /><br>
  30. <b>Dados:</b><br /><br>
  31. Email: {$Email}<br>
  32. Telefone: {$Telefone}<br>
  33. Cargo: {$Cargo}<br>
  34. Mensagem: {$Mensagem}<br>
  35. Curriculo: {$Curriculo['name']}
  36. ";
  37.  
  38. if($Mailer->Send()){
  39.   $Erro = false;
  40. }
  41.  
  42. var_dump($Erro);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement