Advertisement
Guest User

Untitled

a guest
Nov 19th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. 2016-11-19 15:02:48 SMTP ERROR: Failed to connect to server: (0) 2016-11-19 15:02:48 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Erro do servidor: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
  2.  
  3. <?php
  4. require_once('PHPMailerAutoload.php');
  5. $mail = new PHPMailer();
  6. $mail->SMTPDebug = 1;
  7. $mail->Timeout = 60;
  8. $mail->IsHTML(true);
  9. $mail->IsSMTP();
  10. $mail->SMTPAuth = true;
  11. $mail->From = 'contato@ritogomes.com';
  12. $mail->FromName = 'teste';
  13. $mail->Username = 'contato@ritogomes.com';
  14. $mail->Host = 'mail.ritogomes.com';
  15. $mail->Password = 'Minha Senha';
  16. $mail->Port = 465;
  17. $mail->Subject = "Teste";
  18. $mail->SMTPSecure = 'ssl';
  19. $mail->AddAddress("zxuqgtyy@clrmail.com");
  20. $mail->Body = 'testeafasdas';
  21.  
  22. if ($mail->Send()) {
  23.  
  24. error_log("Email enviado");
  25.  
  26. echo "Email enviado com sucesso";
  27. } else {
  28.  
  29. error_log("Erro no envio do email");
  30. error_log($mail->ErrorInfo);
  31.  
  32. echo "Erro do servidor: " . $mail->ErrorInfo;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement