• Resolved windhunde

    (@windhunde)


    We have used Easy WP SMTP since 2018 without any issues until a few weeks ago when it suddenly stopped working.

    When I send a test email, it fails immediately with the message ‘Following error occurred when attempting to send test email: and an empty debug log

    screenshot of error message:
    https://drive.google.com/file/d/1ni_5qjwg6rMTyiXK1gXMDEpk2xXTXoz2/view?usp=sharing

    Settings are as follows:

    SMTP Host: smtp.gmail.com
    Type of Encryption: SMARTTLS
    SMTP Port: 587

    If I change Encryption to SSL/TLS, Test email fails with this error:
    SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server.

    What would cause SMARTTLS to error out without any error message?

    Thanks,
    Dan

    • This topic was modified 1 year, 9 months ago by windhunde.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Dake

    (@dakeg)

    Hi @windhunde

    Thanks for reaching out and we’re sorry to hear that you’re suddenly experiencing issues with connecting to the Gmail SMTP host.

    • Just to confirm, are you using the latest version of Easy WP SMTP? Are you also using the latest version of WordPress and your theme?
    • What other plugins do you currently have enabled?
    • Are you connecting to the Gmail SMTP host using your normal password or an App password that was generated here?
    • To confirm if this is a server specific issue, can you try connecting to one of the alternate example SMTP hosts mentioned in our quick start guide?

    I hope this helps ??

    Thread Starter windhunde

    (@windhunde)

    I just upgraded to 2.0.1 (was 1.5.3) and am now getting debugging data from the test. WP version 6.1.1, theme is up to date.

    We were using a password, then during troubleshooting switched to an app password which also failed.

    It looks like gmail smtp is rejecting based on not liking our host’s certificate (or mismatch with our domain?)

    Versions:
    WordPress: 6.1.1
    WordPress MS: No
    PHP: 8.1.15
    Easy WP SMTP: 2.0.1 Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=
    rsq.petrescuehosting.net' did not match expected CN=smtp.gmail.com'SMTP server error: QUIT command failed Detail: j //
    Host: smtp.gmail.com
    Port: 587
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true) Server:
    OpenSSL: OpenSSL 1.1.1t 7 Feb 2023
    SMTP Debug:
    2023-02-16 14:22:32 Connection: opening to smtp.gmail.com:587, timeout=30, options=array() 2023-02-16 14:22:32 Connection: opened 2023-02-16 14:22:32 SERVER -> CLIENT: 220-rsq.petrescuehosting.net ESMTP Exim 4.96 #2 Thu, 16 Feb 2023 09:22:32 -0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. 2023-02-16 14:22:32 CLIENT -> SERVER: EHLO www.pawsonthemountain.org 2023-02-16 14:22:32 SERVER -> CLIENT: 250-rsq.petrescuehosting.net Hello www.pawsonthemountain.org [170.75.251.59]250-SIZE 52428800250-8BITMIME250-PIPELINING250-PIPECONNECT250-AUTH PLAIN LOGIN250-STARTTLS250 HELP 2023-02-16 14:22:32 CLIENT -> SERVER: STARTTLS 2023-02-16 14:22:32 SERVER -> CLIENT: 220 TLS go ahead 2023-02-16 14:22:32 Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=rsq.petrescuehosting.net' did not match expected CN=smtp.gmail.com' [/home/ghrescue/public_html/wp-includes/PHPMailer/SMTP.php line 468] SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=rsq.petrescuehosting.net' did not match expected CN=smtp.gmail.com' 2023-02-16 14:22:32 CLIENT -> SERVER: QUIT 2023-02-16 14:22:33 2023-02-16 14:22:33 2023-02-16 14:22:33 Connection: closed SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=rsq.petrescuehosting.net' did not match expected CN=smtp.gmail.com'

    Plugin Support Dake

    (@dakeg)

    Hi @windhunde

    Thank you for keeping us posted.

    You’ll need to reach out to your hosting provider about this so they can look into why this error is coming up. Essentially there is an issue with the SSL certificate. You can send over the whole error message, but definitely make sure to send over this part:

    ==============
    2023-02-16 14:22:32 Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=rsq.petrescuehosting.net’ did not match expected CN=smtp.gmail.com’ [/home/ghrescue/public_html/wp-includes/PHPMailer/SMTP.php line 468]

    SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=rsq.petrescuehosting.net’ did not match expected CN=smtp.gmail.com’
    ==============

    The connection is attempting to reach the smtp.gmail.com server, but the error shows that the certificate is coming up for rsq.petrescuehosting.net.

    I hope this helps ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SMTP Gmail connection issue’ is closed to new replies.