phpmailer error: Network is unreachable (101)

Asked

Viewed 470 times

0

We were using phpmailer to send emails, but simply overnight the same is with a strange behavior not sending emails.

The error that occurs:

SMTP -> ERROR: Failed to connect to server: Network is unreachable (101)

The setting is this:

//Set the hostname of the mail server
$mail->Host = '*****';
// use
// $mail->Host = gethostbyname('smtp.gmail.com');
// if your network does not support SMTP over IPv6

$mail->SMTPAutoTLS = false;

//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
$mail->Port = 587;

//Set the encryption system to use - ssl (deprecated) or tls
$mail->SMTPSecure = 'tls';

//Whether to use SMTP authentication
$mail->SMTPAuth = true;

//Username to use for SMTP authentication - use full email address for gmail
$mail->Username = "[email protected]";

//Password to use for SMTP authentication
$mail->Password = "*****";

All settings have been reviewed and all of them are correct.

  • Which server and port is using?

  • The cocari.com.br supports tls or ssl?

  • Hello @Guilhermenascimento, yes, supports. TLS port 587

  • The mistake Network is unreachable to say that the network is inaccessible, the host that used and cocari.com.br or smtp.cocari.com.br or mail.cocari.com.br?

  • 1

    Try the command on Windows CMD something similar to this telnet smtp.cocari.com.br 587, change smtp.cocari.com.br to your smtp host and tell me the result. Which hosting is using?

  • The host used: mail.cocari.com.br we are using our own hosting.

  • Why telnet is connecting right.

  • Your server and Windowsserver?

  • Report to the network administrator a possible firewall lock on port 587, I think maybe this is the problem.

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.