WP Mail SMTP plugin dont works over ssl or tls

Any idea why wp smtp plugin not sends through ssl?, It used to. Now i have to turn it to unsecure option and it works and email clients too. But not over ssl, neither works.

Versions:
WordPress: 6.1
WordPress MS: No
PHP: 7.4.33
WP Mail SMTP: 3.6.1

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:1416F086:SSL routines:tls_process_server_certificate:certificate verify failedSMTP server error: QUIT command failed Detail: `#:
Host: mail.xxxxxxxx.com
Port: 587
SMTPSecure:

tls

SMTPAutoTLS:

bool(true)

SMTPAuth:

bool(true)

Server:
OpenSSL: OpenSSL 1.1.1f 31 Mar 2020
Apache.mod_security: No

Debug:
Email Source: WP Mail SMTP Mailer: Other SMTP SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server

SMTP Debug:

2022-11-04 16:45:51 Connection: opening to mail.xxxxxx.com:587, timeout=300, options=array()
2022-11-04 16:45:51 Connection: opened
2022-11-04 16:45:52 SERVER → CLIENT: 220 mail.xxxxxxx.com ESMTP Postfix
2022-11-04 16:45:52 CLIENT → SERVER: EHLO xxxxxx.com
2022-11-04 16:45:52 SERVER → CLIENT: 250-mail.xxxxxxx.com250-PIPELINING250-SIZE 30720000250-ETRN250-STARTTLS250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250 CHUNKING
2022-11-04 16:45:52 CLIENT → SERVER: STARTTLS
2022-11-04 16:45:52 SERVER → CLIENT: 220 2.0.0 Ready to start TLS
2022-11-04 16:45:52 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [/home/zzzzz.com/public_html/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:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
2022-11-04 16:45:52 CLIENT → SERVER: QUIT
2022-11-04 16:45:52
2022-11-04 16:45:52
2022-11-04 16:45:52 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:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Hello @Xaos

This sounds like a Mail server misconfiguration.

  1. Reissue mail server SSL
  2. Find mail delivery errors by running journalctl -f | grep postfix
  3. Have you seen this guides:

https://www.youtube.com/watch?v=k_WriIl_Bo4&t=350s

https://community.cyberpanel.net/t/how-to-build-your-own-free-smtp-server-on-cyberpanel-and-send-emails/30625?u=josephgodwinke

Hi, I got working mail server with good score, used to work over ssl,tsl but now not, works unsecured connections. I did reissued ssl certs but no help

nothing in logs

Have you checked whether the issued ssl is correct? usually when you issue ssl, even if it fails to generate valid letsencrypt ssl and issues self signed ssl it will display you a success message mentioning ssl is issued successfully. Just check under manage options of any domain or child domain and see whether its a valid ssl or self signed one.

First verify your ssl server certificate https://check-your-website.server-daten.de/?q=zzzzz.com Check 2. DNSSEC and 9. Certificates if all is good. Also check if chain is complete 8. Connections If you dot understand what you are seeing post the Permalink of the result here or my PM if you want more privacy

I have a similar problem, running the command journalctl -f | grep postfix

Solved, I used to use the hostname of the server to connect via SMTP but now I use the mail.domain.

hi,
I have issued mail server ssl but wp smtp plugin can not send mail and the logs are same above. I reissued and try it again, the problem is remaining. I tried this solution (https://pcx3.com/cyberpanel/cyberpanel-self-signed-certificate-issue/) for mail.domain.com. it was not solved. Any recommend for this problem?
I can set up mails to outlook, it works but messages untrusted certificate error.
I cannot set up mail on iPhone. I think it because of the same problem.