Error: cURL error 77: certificate problem (Gmail)
Your web server cannot read its list of trusted certificates, so it cannot open a secure connection to Google. Your host has to fix it.
This article is for sites where sending fails with "cURL error 77". It is most often reported by the Google / Gmail mailer, but any mailer that talks to its service over HTTPS (all API mailers, including Microsoft 365, Amazon SES and SendGrid) can show it on the same server.
The error as you see it
cURL error 77: error setting certificate verify locations
Usually shown by the Google / Gmail mailer, in the failed-send banner and in Tools → Debug Events. The failed-send banner adds "SSL certificate issue."
What this error means
Before PHP connects to Google over HTTPS it must check Google's certificate against a file of trusted certificate authorities (a "CA bundle") stored on your server. Error 77 means PHP could not even open that file. The connection is never attempted, so nothing reaches Google. Your Google settings are not the problem: this is a server configuration fault, and only the person who manages the server can fix it.
Common causes
- The CA bundle path in PHP's settings is wrong.
curl.cainfooropenssl.cafileinphp.inipoints to a file that does not exist, often after a PHP upgrade or a move to a new server. - The file exists but PHP cannot read it, because of file permissions or an
open_basedirrestriction that excludes the certificate folder. - The server's certificate package is missing or broken, for example after an incomplete operating system update.
- A container or chroot setup does not include the system certificate folder.
How to fix
- Copy the error
In WordPress go to CRM-NG SMTP → Tools → Debug Events, open the latest Email Sending Errors entry and copy the full text. In the failed-send banner you can also use View Error Log and Copy error log.
- Contact your host
Send the error to your hosting provider. Tell them PHP's cURL cannot load its CA certificate bundle (error 77) and ask them to check
curl.cainfo,openssl.cafile, file permissions and anyopen_basedirlimit. - If you manage the server yourself
Make sure the operating system's certificate package is installed and current (for example
ca-certificateson Debian or Ubuntu). Check that the path inphp.inipoints to the real bundle file and that the web server user can read it. Restart PHP-FPM or the web server afterwards. - Check other HTTPS features
If WordPress updates or plugin downloads also fail, that confirms the server-wide cause.
- Send a test
Once the host reports it fixed, go to CRM-NG SMTP → Tools → Email Test, fill in Send To and press Send Email.
Verify it worked
The test page reports "Test email sent successfully! Check your inbox to confirm delivery." Tools → Debug Events stops recording new cURL 77 entries.
Notes
- Do not try to "fix" this by turning off certificate checks with a code snippet. That would let anyone between your server and Google read or change your mail and your access tokens.
- Switching to another mailer will not help, because every API mailer needs the same certificate file. The Other SMTP mailer checks certificates too, through a different route, so it may fail in a different way.
- A similar but different message, "certificate verify failed", means the file was read but a certificate did not check out. See SSL certificate verify failed.
