• Resolved nikolapericbag

    (@nikolapericbag)


    We’re about to create a new corporate website. We’re using Exchange online as a Mailer. We’ve checked the SMTP settings on our WordPress, which seems to be fine, using TLS with Port 25 and without Username/Password authentication, as the authentication is done by ssl certificate. Our IT made a SMTP Relay to check the websites SSL Certificate. Alltough every setting is looking good, it’s throwing the error: “SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    “. Is there anything we can do?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter nikolapericbag

    (@nikolapericbag)

    Here’s the error log:

    Versions:
    WordPress: 5.8.2
    WordPress MS: No
    PHP: 7.4.25
    WP Mail SMTP: 3.1.0
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: bachofen-ch.mail.protection.outlook.com
    Port: 25
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(false)
    
    Server:
    OpenSSL: OpenSSL 1.0.1t 3 May 2016
    
    Debug:
    Email Source: iThemes Security Pro
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Email Source: UpdraftPlus - Backup/Restore
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Email Source: Elementor Pro
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Email Source: WP Core
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Email Source: WP Mail SMTP
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    
    SMTP Debug:
    2021-11-19 08:10:01 Connection: opening to bachofen-ch.mail.protection.outlook.com:25, timeout=300, options=array()
    
    2021-11-19 08:14:22 Connection failed. Error #2: stream_socket_client(): unable to connect to bachofen-ch.mail.protection.outlook.com:25 (Connection timed out) [/home/clients/8e733dee36816be1a87b9966c4da10df/web/wp-includes/PHPMailer/SMTP.php line 388]
    
    2021-11-19 08:14:22 SMTP ERROR: Failed to connect to server: Connection timed out (110)
    
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Hi @nikolapericbag,

    Thanks for the details! TLS should be used with port 587. If you’d required to use Port 25 and without Username/Password authentication – encryption should be “None”, which is usually not recommended but since you said that authentication is done by ssl certificate, you are probably already aware of that.

    Regards,

    Thread Starter nikolapericbag

    (@nikolapericbag)

    Hi @sanzeeb3

    Thank you for your reply. I set the encryption to none and tried to send a test mail. Again with failure.

    Weird is, it worked (with encryption TLS and Port 25) for almost a year and since august 2021 it stopped working.

    Versions:
    WordPress: 5.8.2
    WordPress MS: No
    PHP: 7.4.25
    WP Mail SMTP: 3.1.0
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: bachofen-ch.mail.protection.outlook.com
    Port: 25
    SMTPSecure: string(0) ""
    SMTPAutoTLS: bool(false)
    SMTPAuth: bool(false)
    
    Server:
    OpenSSL: OpenSSL 1.0.1t 3 May 2016
    
    Debug:
    Email Source: UpdraftPlus - Backup/Restore
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Email Source: Elementor Pro
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Email Source: WP Mail SMTP
    Mailer: Other SMTP
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    
    SMTP Debug:
    2021-11-22 12:15:59 Connection: opening to bachofen-ch.mail.protection.outlook.com:25, timeout=300, options=array()
    
    2021-11-22 12:20:21 Connection failed. Error #2: stream_socket_client(): unable to connect to bachofen-ch.mail.protection.outlook.com:25 (Connection timed out) [/home/clients/8e733dee36816be1a87b9966c4da10df/web/wp-includes/PHPMailer/SMTP.php line 388]
    
    2021-11-22 12:20:21 SMTP ERROR: Failed to connect to server: Connection timed out (110)
    
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Hi @nikolapericbag,

    Thanks for the details! As per the error message, your site isn’t able to connect to the SMTP server with the provided SMTP settings. I’d suggest verifying the SMTP settings and get in touch with your web host to make sure the external SMTP connection isn’t blocked.

    Alternatively, switch to other of our available mailers. We have a documentation on setting up each of the mailers.

    I hope this helps!

    Thread Starter nikolapericbag

    (@nikolapericbag)

    Hi @sanzeeb3
    I found the error. As we’re using Microsoft Exchange online, they stopped support for TLS 1.0 and TLS 1.1. On our webhost OpenSSL 1.0 is installed. I moved the site to another hosting to test it with OpenSSL 1.1 and it worked fine.

    You can close this ticket.

    Thank you.

    Hi @nikolapericbag,

    That’s great. Thanks for taking to let us know.

    Have a good one! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Mailer: Other SMTP SMTP connect () failed.’ is closed to new replies.