Error phpMailer: Network is unreachable (101)

0

We were using phpMailer to send e-mails, but it's just a strange behavior not sending emails at all.

The error that occurs:

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

The configuration 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 settings are correct.

    
asked by anonymous 16.09.2015 / 19:26

0 answers