Home > Article > Backend Development > How to Resolve Certificate Verification Errors in TLS Email with Laravel?
Troubleshooting Certificate Verification Errors in TLS Email with Laravel
When sending TLS emails with Laravel, you may encounter certificate verification errors. This can occur due to a mismatch between the expected certificates and those presented by the email server. Here's how to resolve the "certificate verify failed" error:
Your original configuration using MAIL_ENCRYPTION=ssl should use port 465, not 587.
If your operating system does not manage trusted certificates automatically:
Edit php.ini: Include the following lines to reference the cacert.pem file:
curl.cainfo = /path/to/cacert.pem openssl.cafile = /path/to/cacert.pem
Once these steps are complete, Laravel should be able to verify the SSL certificates correctly and send TLS emails without errors.
The above is the detailed content of How to Resolve Certificate Verification Errors in TLS Email with Laravel?. For more information, please follow other related articles on the PHP Chinese website!