Hi, I installed SSL on my mail server mail.mydomain.com I can Send and receive emails but When I add email to wordpress SMTP plugin I got this error, Please help me to fix it
There was a problem while sending the test email.
Misconfigured server certificate.
This means OpenSSL on your server isn't able to verify the host certificate.
There are a few reasons why this is happening. It could be that the host certificate is misconfigured, or this server's OpenSSL is using an outdated CA bundle.
Recommended next steps:
Verify that the host's SSL certificate is valid.
Contact your hosting support, show them the "full Error Log for debugging" below and share this link with them.
Here is Error Log:
Versions:
WordPress: 6.0.1
WordPress MS: No
PHP: 7.4.30
WP Mail SMTP: 3.5.2
Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Host: mail.mydomain.com
Port: 587
SMTPSecure: tls
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)
Server:
OpenSSL: OpenSSL 1.0.2u 20 Dec 2019
Debug:
Mailer: Other SMTP
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
SMTP Debug:
2022-08-21 20:11:33 Connection: opening to mail.mydomain.com:587, timeout=300, options=array()
2022-08-21 20:11:33 Connection: opened
2022-08-21 20:11:33 SERVER -> CLIENT: 220 mydomain.com ESMTP Postfix (Ubuntu)
2022-08-21 20:11:33 CLIENT -> SERVER: EHLO mydomain.com
2022-08-21 20:11:33 SERVER -> CLIENT: 250-mydomain.com250-PIPELINING250-SIZE 102400000250-VRFY250-ETRN250-STARTTLS250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250-SMTPUTF8250 CHUNKING
2022-08-21 20:11:33 CLIENT -> SERVER: STARTTLS
2022-08-21 20:11:33 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
2022-08-21 20:11:33 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [/www/wwwroot/mydomain.com/wp-includes/PHPMailer/SMTP.php line 468]
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
2022-08-21 20:11:33 CLIENT -> SERVER: QUIT
2022-08-21 20:11:33
2022-08-21 20:11:33
2022-08-21 20:11:33 Connection: closed
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed