• Resolved V Chappell

    (@vcchappell)


    I recently moved my WordPress site to a new server which has cPanel (the old server did not). Now when I try to send a test e-mail from the plugin, I get this error:

    Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=cloud01.erospirit.org' did not match expected CN=smtp.gmail.com’ [/home/erospirit/yoga/public_html/wp-includes/PHPMailer/SMTP.php line 495]
    SMTP Error: Could not connect to SMTP host.

    The CN is the name of my cPanel host. The SSL certificate is provided by LetsEncrypt using cPanel’s AutoSSL function.

    I can bypass this by checking the “Disable SSL Certificate Verification” option in the plugin settings, but I’d like to know how to fix it so it works as intended. Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter V Chappell

    (@vcchappell)

    Never mind! Figured it out. It was a cPanel issue.

    In WHM it is necessary to go to Tweak Settings, then under the Mail tab, set “Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)” to Off.

Viewing 1 replies (of 1 total)

The topic ‘Certificate mismatch error’ is closed to new replies.