awesomemotive / WP-Mail-SMTP

The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 3 million sites.
https://wordpress.org/plugins/wp-mail-smtp/
GNU General Public License v3.0
55 stars 35 forks source link

Get openssl error #92

Closed GentleRV closed 3 years ago

GentleRV commented 3 years ago

Expected Behavior

Negotiate with the sever to get the certificate and store of update it The email server is Mercury from David Harris with a self generated openssl certificate Email server works with ssl/tls and no errors receiving or sending emails with ssl/tls enabled

Current Behavior

Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:1408F10B:SSL routines:ssl3_get_record:wrong version number [/var/www/html/wordpress/wp-includes/PHPMailer/SMTP.php line 387]

Possible Solution

Steps to Reproduce

1. 2. 3. 4.

Screenshots

Versions: WordPress: 5.7.1 WordPress MS: No PHP: 7.4.16 WP Mail SMTP: 2.7.0

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

Server: OpenSSL: OpenSSL 1.1.1j 16 Feb 2021

Debug: Mailer: Other SMTP SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

SMTP Debug:

2021-04-24 07:56:56 Connection: opening to ssl://91.229.62.12:25, timeout=300, options=array()

2021-04-24 07:56:56 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:1408F10B:SSL routines:ssl3_get_record:wrong version number [/var/www/html/wordpress/wp-includes/PHPMailer/SMTP.php line 387]

2021-04-24 07:56:56 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/var/www/html/wordpress/wp-includes/PHPMailer/SMTP.php line 387]

2021-04-24 07:56:56 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://91.229.62.12:994 (Unknown error) [/var/www/html/wordpress/wp-includes/PHPMailer/SMTP.php line 387]

2021-04-24 07:56:56 SMTP ERROR: Failed to connect to server: (0)

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

capuderg commented 3 years ago

Hi,

as you can see from your debug logs the SMTPSecure is set to "ssl" and the Port is set to "25". The port value for "ssl" is usually "465" or if you try with "tls", the port should be "587".

Try to change these two settings in the plugin and send a new Test Email. Let us know how it goes.

Take care!

capuderg commented 3 years ago

Just wanted to update this GH issue to let you know that this is more of a support request (than a plugin bug) and these should be created in our support forum on WordPress.org: https://wordpress.org/support/plugin/wp-mail-smtp/.

Please open a support thread in the above link if you need further help.

Have a nice day!