Advertisement
Guest User

Untitled

a guest
Mar 9th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. require_once('c:wamp64wwwphpmailerclass.phpmailer.php');
  2.  
  3.  
  4. $mail = New PHPMailer();
  5. //$mail-> ErrorInfo;
  6. //exit;
  7. $mail->IsSMTP = true;
  8. //$mail-> ErrorInfo;
  9. //exit;
  10. $mail->SMTPSecure = "ssl";
  11. //$mail-> ErrorInfo;
  12. //exit;
  13. $mail->Host = "smtp.host.com.br";
  14. //$mail-> ErrorInfo;
  15. //exit;
  16. $mail->Port = 465;
  17. //$mail-> ErrorInfo;
  18. //exit;
  19. $mail->Username = "teste@example.com.br";
  20. $mail->Password = "senha123";
  21. //$mail-> ErrorInfo;
  22. //exit;
  23.  
  24. $mail->From = "teste@example.com.br";
  25. $mail->FromName = "Suporte";
  26. //$mail-> ErrorInfo;
  27. //exit;
  28. $mail->Subject = "Teste de Envio";
  29. $html = "aa !";
  30. $text = "aa ! ";
  31. $mail->Body = $html;
  32. $mail->AltBody = $text;
  33. //$mail-> ErrorInfo;
  34. //exit;
  35. $mail->AddAddress("teste@example.com.br", "suporte");
  36. //$mail-> ErrorInfo;
  37. //exit;
  38. if (!$mail->Send()){
  39. echo "Erro DNOVO !".$mail->ErrorInfo;
  40. } else {
  41. echo "ALELUIA DEU CERTO !";
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement