• Resolved ggdp

    (@ggdp)


    Hello,

    I installed WP Forms and WP Mail STMP about two weeks ago and for a while, everything was working perfectly. A few days ago, I logged into my WP dashboard and saw the following error:

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v1.4.2 logged this error during the last time it tried to send an email:

    Mailer: Other SMTP
    PHPMailer was able to connect to SMTP server but failed while trying to send an email.

    I contacted my host to make sure I had all STMP settings correct. All was well. They checked the port and even checked the site IP address to make sure nothing was blocked. No issue on their end could be found, so I’m hoping maybe someone could help me here? This is the error log:

    Versions:
    WordPress: 5.1.1
    WordPress MS: No
    PHP: 7.2.16
    WP Mail SMTP: 1.4.2

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: hades.canspace.ca
    Port: 465
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(false)

    Server:
    OpenSSL: OpenSSL 1.0.2r 26 Feb 2019
    SMTP Debug:
    2019-04-08 02:30:01 Connection: opening to hades.canspace.ca:465, timeout=300, options=array (
    )
    2019-04-08 02:30:01 Connection: opened
    2019-04-08 02:32:46 SERVER -> CLIENT:
    2019-04-08 02:32:46 SMTP NOTICE: EOF caught while checking if connected
    2019-04-08 02:32:46 Connection: closed
    2019-04-08 02:32:46 SMTP Error: Could not connect to SMTP host.
    2019-04-08 02:32:46 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Any suggestions would be very much appreciated! Thanks in advance.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi ggdp,

    That’s perfect that you already checked with your host about the port, etc. It looks from this log, though, that you currently have the “Authentication” setting turned off.

    In order for most SMTP setups to work properly, this will need to be turned on. Specifically, you’d need to go to Settings > WP Mail SMTP and toggle the Authentication setting to On. Then, you’d need to fill out the SMTP Username and SMTP Password fields with your full email address, and your password for that email.

    After saving these settings, please try running a test email to see if it works (and if not, whether the error message changed).

    Last, if this still doesn’t work you might consider switching to one of the other mailer options (like SendGrid or Mailgun). The “Other SMTP” option will tend to run into server-based issues since it’s traditional SMTP, however these other mailers use an API so should avoid those types of issues.

    I hope these details help you get this back up and running!

    Thread Starter ggdp

    (@ggdp)

    Hello Jess,

    Thanks so much for the quick response. Much appreciated. ??

    SendGrid is what eventually solved it!

    Glad to hear it! Thanks for letting me know what ended up working for you ??

    I have tried everything to get my office365 email to work on the site and exhaused everything to this point with office365 support. I also tried a gmail email and received the same error
    SMTP ERROR: Failed to connect to server: (0)SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    I went to the link above and have done all the trouble shooting recommended to no avail.

    Has anyone else had this problem with their Office365 email and did you find a fix.

    Versions:
    WordPress: 5.0.4
    WordPress MS: No
    PHP: 7.1.28
    WP Mail SMTP: 1.4.2

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.office365.com
    Port: 587
    SMTPSecure: ssl
    SMTPAutoTLS: bool(false)
    SMTPAuth: bool(true)

    Server:
    OpenSSL: OpenSSL 1.0.2r 26 Feb 2019
    SMTP Debug:
    2019-05-24 04:23:32 Connection: opening to ssl://smtp.office365.com:587, timeout=10, options=array (
    )
    2019-05-24 04:23:32 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
    error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    2019-05-24 04:23:32 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): Failed to enable crypto
    2019-05-24 04:23:32 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to ssl://smtp.office365.com:587 (Unknown error)
    2019-05-24 04:23:32 SMTP ERROR: Failed to connect to server: (0)
    2019-05-24 04:23:32 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Could not connect to the SMTP host’ is closed to new replies.