Documentation

✉️ Email Delivery

Documentation, reference material and tutorials for CRM-NG SMTP Email: setup guides for every mail service, troubleshooting, and one article per error message.

Error: cURL error 77: certificate problem (Gmail)

Updated

By Duane GarnerChief Executive Officer (CEO)
Summarize: Claude ChatGPT View Markdown
On this page

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.cainfo or openssl.cafile in php.ini points 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_basedir restriction 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

  1. 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.

  2. 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 any open_basedir limit.

  3. If you manage the server yourself

    Make sure the operating system's certificate package is installed and current (for example ca-certificates on Debian or Ubuntu). Check that the path in php.ini points to the real bundle file and that the web server user can read it. Restart PHP-FPM or the web server afterwards.

  4. Check other HTTPS features

    If WordPress updates or plugin downloads also fail, that confirms the server-wide cause.

  5. 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.
Go to Top