Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- <?php
- require_once('PHPMailerAutoload.php');
- $mail = new PHPMailer();
- $mail->SMTPDebug = 1;
- $mail->Timeout = 60;
- $mail->IsHTML(true);
- $mail->IsSMTP();
- $mail->SMTPAuth = true;
- $mail->From = 'contato@ritogomes.com';
- $mail->FromName = 'teste';
- $mail->Username = 'contato@ritogomes.com';
- $mail->Host = 'mail.ritogomes.com';
- $mail->Password = 'Minha Senha';
- $mail->Port = 465;
- $mail->Subject = "Teste";
- $mail->SMTPSecure = 'ssl';
- $mail->AddAddress("zxuqgtyy@clrmail.com");
- $mail->Body = 'testeafasdas';
- if ($mail->Send()) {
- error_log("Email enviado");
- echo "Email enviado com sucesso";
- } else {
- error_log("Erro no envio do email");
- error_log($mail->ErrorInfo);
- echo "Erro do servidor: " . $mail->ErrorInfo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement