When using SMTP service like wordpress smtp configuration or laravel email configuration i was getting this Open SSL error. certificate can not verify.
The solution is just login to the cpanel and edit the php.ini or user.ini file.
add these 2 line and save it. problem will be solved inshallah.
openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt
openssl.capath=/etc/pki/tls/certs