Title: Getting stream_socket_enable_crypto() errors
Last modified: February 15, 2017

---

# Getting stream_socket_enable_crypto() errors

 *  [oxygensmith](https://wordpress.org/support/users/oxygensmith/)
 * (@oxygensmith)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/)
 * I’m getting stream_socket_enable_crypto() errors when submitting forms I’ve created
   with the Gravity Forms plugin. The site uses Google Apps for Work for email, 
   and connects to these services with Gmail SMTP. I am not getting any warnings
   in the Gmail SMTP configuration area.
 * While I also have written Gravity Forms about this issue, I thought that you 
   might have insight as to why I am getting stream_socket_enable_crypto() errors,
   since the errors seem to be taking place in the Gmail SMTP files.
 * This is the error I’m getting at the provided link, when I submit the form:
    
   [https://muskeglake.com/membersarea/addresschange](https://muskeglake.com/membersarea/addresschange).
   The form sends notification email.
 * stream_socket_enable_crypto(): Peer certificate CN=`hosting.uber-cloud.com' did
   not match expected CN=`smtp.gmail.com’ in /home/muskegla/public_html/wp-content/
   plugins/gmail-smtp/PHPMailer/class.smtp.php on line 369
 * Warning: stream_socket_enable_crypto(): Peer certificate CN=`hosting.uber-cloud.
   com' did not match expected CN=`smtp.gmail.com’ in /home/muskegla/public_html/
   wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php on line 369
 * I’m also getting the error at a second form, [https://muskeglake.com/contact](https://muskeglake.com/contact),
   when it is submitted. This form also sends notification email from a Google Apps
   address.
 * Warning: stream_socket_enable_crypto(): Peer certificate CN=`hosting.uber-cloud.
   com' did not match expected CN=`smtp.gmail.com’ in /home/muskegla/public_html/
   wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php on line 369
 * If you can shed any light on this, that would be awesome.
 * I have double checked the server’s MX records and they are definitely using Remote
   Mail Exchanger and have Gmail’s MX records set up correctly. The Gmail SMTP plugin
   has also been updated to the latest (version 1.1.1).
 * Thanks for whatever help you can provide!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/#post-8818881)
 * Hi, Have you tried the “Disable SSL Certificate Verification” option in the Gmail
   SMTP plugin settings?
 *  Thread Starter [oxygensmith](https://wordpress.org/support/users/oxygensmith/)
 * (@oxygensmith)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/#post-8819091)
 * Yeah, I have tried that, but on this particular server,
 * — it hides the errors,
    — but it doesn’t send the email.
 * When I go to test the email with the testing panel, I get this feedback:
 * SERVER -> CLIENT: 250-hosting.uber-cloud.com Hello hosting.uber-cloud.com [149.56.182.144]
   250-SIZE 52428800250-8BITMIME250-PIPELINING250-AUTH PLAIN LOGIN250-CHUNKING250
   HELP
    Auth method requested: XOAUTH2 Auth methods available on the server: PLAIN,
   LOGIN SMTP Error: Could not authenticate. CLIENT -> SERVER: QUIT SMTP -> get_lines():
   $data is “” SMTP -> get_lines(): $str is “221 hosting.uber-cloud.com closing 
   connection” SERVER -> CLIENT: 221 hosting.uber-cloud.com closing connection Connection:
   closed SMTP connect() failed. [https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)
 * Would this mean that the SSL certificate is configured incorrectly?
 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/#post-8848597)
 * Usually it just shows a warning when it’s not confiugred correctly. But the email
   still goes through. I think there are other issues here as the log states
 * Auth method requested: XOAUTH2
    Auth methods available on the server: PLAIN,LOGIN(
   XOAUTH2 method unavailable)
 * Can you send me the content of the “Server Info” tab? Which port and encryption
   are you using?
 *  Thread Starter [oxygensmith](https://wordpress.org/support/users/oxygensmith/)
 * (@oxygensmith)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/#post-8903517)
 * Hi there and apologies for the delay in responding.
 * Here’s information from the Server Info tab.
 * We are presently using port: TLS and 587.
 * OS: Linux hosting.uber-cloud.com 3.10.0-327.18.2.el7.x86_64 #1 SMP Thu May 12
   11:03:55 UTC 2016 x86_64
    PHP version: 5.6.25 WordPress version: 4.7.3 WordPress
   multisite: No openssl: Available allow_url_fopen: Enabled stream_socket_client:
   Available fsockopen: Available cURL: Available cURL Version: 7.38.0, OpenSSL/
   1.0.1e
 *  Thread Starter [oxygensmith](https://wordpress.org/support/users/oxygensmith/)
 * (@oxygensmith)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/#post-9147317)
 * Hey Gmail SMTP – any updates? We’re still getting this error.
    What might the“
   other issues” be? How could I avoid getting the plugin, or the server, to not
   use XOAUTH2 for the validation?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Getting stream_socket_enable_crypto() errors’ is closed to new replies.

 * ![](https://ps.w.org/gmail-smtp/assets/icon-128x128.png?rev=2432932)
 * [Gmail SMTP](https://wordpress.org/plugins/gmail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gmail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gmail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/gmail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gmail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gmail-smtp/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 5 replies
 * 2 participants
 * Last reply from: [oxygensmith](https://wordpress.org/support/users/oxygensmith/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/getting-stream_socket_enable_crypto-errors/#post-9147317)
 * Status: not resolved