Home > Article > Backend Development > How to Fix \"Certificate Verify Failed\" Errors When Sending TLS Emails with Laravel?
Troubleshooting "Certificate Verify Failed" Errors in Laravel TLS Email Sending
Problem:
When attempting to send TLS-encrypted emails via Gmail using Laravel 5.5, PHP 7.1.4, and Apache httpd 2.4 on Windows 10, errors such as "stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed" are encountered.
Solution:
To resolve the "certificate verify failed" error, follow these steps:
1. Download cURL cacert.pem Certificate Bundle:
2. Configure php.ini:
curl.cainfo = [Path to cacert.pem] openssl.cafile = [Path to cacert.pem]
3. Restart PHP-FPM:
4. Optional:
The above is the detailed content of How to Fix \"Certificate Verify Failed\" Errors When Sending TLS Emails with Laravel?. For more information, please follow other related articles on the PHP Chinese website!