[Solved] WP Mail SMTP Error [Move From cPanel to CyberP]

Hi Guys,

Please help me fix the WordPress email delivery error in WP Mail SMTP plugin. Using cPanel and LiteSpeed Enterprise it worked but when I transferred to CyberPanel and OpenLitespeed it has error. Using SMTP to deliver mail has the following error:

  1. Plugin Notice:
    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.
  2. Error Log:
    Versions:
    WordPress: 5.7
    WordPress MS: Yes
    PHP: 7.4.15
    WP Mail SMTP: 2.7.0

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
Host: mail.carefy.ph
Port: 465
SMTPSecure: ssl
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: OpenSSL 1.0.2k 26 Jan 2017
Apache.mod_security: No

Debug:
Mailer: Other SMTP
SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub

SMTP Debug:
2021-04-02 02:41:51 Connection: opening to ssl://mail.carefy.ph:465, timeout=300, options=array()

2021-04-02 02:41:51 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [/home/carefy.ph/public_html/wp-includes/PHPMailer/SMTP.php line 387]

2021-04-02 02:41:51 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/home/carefy.ph/public_html/wp-includes/PHPMailer/SMTP.php line 387]

2021-04-02 02:41:51 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://mail.carefy.ph:465 (Unknown error) [/home/carefy.ph/public_html/wp-includes/PHPMailer/SMTP.php line 387]

2021-04-02 02:41:51 SMTP ERROR: Failed to connect to server: (0)

SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub

I was able to fix it by doing a Full Back in cPanel and transfer it to Cyberpanel using the commands. Auto import cPanel sites to CyberPanel - CyberPanel
Before I transfer it the slow way, transfer database and public html.