Advertisement
Guest User

Untitled

a guest
Jun 6th, 2017
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <?php
  2. require("contato.php");
  3. require("index2.php");
  4. require("incluir.php");
  5. require("phpmailer/class.phpmailer.php");
  6.  
  7. //instanciar
  8. $email = new PHPMailer();
  9. //smtp
  10. $email->IsSMTP();
  11. $email->SMTPAuth = true;
  12. $email->SMTPSecure = "ssl";
  13. $email->Host = "mail.studiomnatal.com.br";
  14. $email->Port = 465;
  15. $email->Username = "contato@studiomnatal.com.br";
  16. $email->Password = "lalalalala";
  17. $email->From = $_POST['editemail'];
  18. $email->FromName = $_POST['editnome'];
  19. $email->Subject = $_POST['editassunto'];
  20. $texto = "Novo E-mail";
  21. $contato = "contato@studiomnatal.com.br";
  22. $email->AddBCC($contato, 'Contatos');
  23. $html = $_POST['editmsg'];
  24. //$nome = $_POST['editnome'];
  25.  
  26.  
  27. $email->Body = "<div style='font-family: Tahoma; font-size: 12px;'>";
  28. // $email->Body .= "Nome do cliente: " . "<b>".$nome."</b>"."<br />";
  29. $email->Body .= $html;
  30. $email->Body .= "</div>";
  31. $email->AltBody = $texto;
  32. if (!$email->Send())
  33. {
  34. echo "Erro " . $email->ErrorInfo;
  35. }
  36.  
  37. else
  38. {
  39. header("Location: index2.php?pagina=emailenviado");
  40. }
  41.  
  42.  
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement