Guest User

Untitled

a guest
Feb 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. $destino="teste@teste.com.br";
  2. $body = "
  3. <html>
  4. Olá , viemos informar infelizmente sua ordem de serviço não foi aceita.
  5. </html>
  6. ";
  7.  
  8. $destino_name = $destino;
  9.  
  10. date_default_timezone_set('America/Sao_Paulo');
  11. require('../phpmailer/PHPMailerAutoload.php');
  12.  
  13. // Instância
  14. $mail = new PHPMailer;
  15. $mail->IsHTML(true);
  16. $mail->CharSet="utf-8";
  17. $mail->isSMTP();
  18.  
  19. $mail->SMTPOptions = array(
  20. 'ssl' => array(
  21. 'verify_peer' => false,
  22. )
  23. );
  24. // Debug
  25. $mail->SMTPDebug = 0;
  26. $mail->Debugoutput = 'html';
  27.  
  28. $mail->Host = "host5.oneclickhosting.com.br";
  29. $mail->Port = 587;
  30. $mail->SMTPSecure = 'tls';
  31. $mail->SMTPAuth = true;
  32. $mail->Username = 'teste@teste.com.br';
  33. $mail->Password = 'teste';
  34.  
  35. $mail->setFrom($remetente, $remetente_name);
  36. $mail->addAddress($destino, $destino_name);
  37. $mail->Subject = $assunto;
  38.  
  39. $mail->Body = $body;
  40.  
  41. if ($mail->send()) {
  42. echo "
  43. <script type="text/javascript">
  44. alert("Que pena você rejeitou a ordem de serviço! Fique atento no seu email posteriormente pode aparecer uma nova oportunidade!");
  45. location.href='../ver.php';
  46. </script>";
  47. }
Add Comment
Please, Sign In to add comment