• Resolved kingofmycastle

    (@kingofmycastle)


    Hi, we have been using WP Mail SMTP fine until a recent server move. Now we cannot connect to our mailserver using WP Mail SMTP and are getting a Connection Failed Error #2 – Unable to connect to smtp.XXXXXXX.com – Connection refused (111).

    I have tried the old port 25 as well as 587 and get the same message. I’ve had a fiddle with DNS too but no joy.

    Does this message signify that the connection is being prevented at the mailserver, or that the message isn’t even leaving our server due to a firewall?

    It would be great if I could work out if it’s us or them but I don’t know how to.

    Versions:
    WordPress: 5.5.1
    WordPress MS: No
    PHP: 7.3.21
    WP Mail SMTP: 2.4.0
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.XXXXXXXX.com
    Port: 587
    SMTPSecure: string(0) ""
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    
    Server:
    OpenSSL: OpenSSL 1.0.2k 26 Jan 2017
    Apache.mod_security: No
    
    Debug:
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    
    SMTP Debug:
    2020-09-24 10:50:01 Connection: opening to smtp.XXXXXXX.com:587, timeout=300, options=array()
    
    2020-09-24 10:50:03 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.XXXXXXXX.com:587 (Connection refused) [/home/wo8w1m1kq4k0/public_html/wp-includes/PHPMailer/SMTP.php line 344]
    
    2020-09-24 10:50:03 SMTP ERROR: Failed to connect to server: Connection refused (111)
    
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @kingofmycastle,

    This means your server could not connect to the SMTP host on that port, likely because of a firewall in your server blocked outbound SMTP connection. With that said, connection to port 587 should be processed with TLS encryption and you’re using none.

    I hope this helps!

    Hi @kingofmycastle – We haven’t heard from you in about a week, so I’m going to go ahead and mark this ticket resolved. If you still have questions, though, please feel welcome to continue the conversation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Connection Refused (111) error debugging. Me or them?’ is closed to new replies.