How to connect Contact Form 7 to a Google Workspace Gmail


Hello all,

I can’t seem to find the right information on this topic. I need someone to point me in the right direction. Basically, I have a form on my website made using contact forms 7. I want the message that a user submits on this form to appear in my gmail inbox. Is there a way to do this?

Also, when editing the form mail section it throws up these errors.

Any suggestions would be massively appreciated.

Our answer

As to your question about how to hook up CF7 to Google Workspace Gmail: you need to seriously consider whether Gmail is the right choice to power your WP mail.

The reason for this is that Gmail works in one two authorization modes:

  • OAuth – Secure but highly technical to set up. This is what a screen looks like that you’ll need to deal with.
  • SMTP – Easier to set up but requires reducing security on the entire Gmail account on which it runs.

For some people this makes it an impossible choice.

Also, if you’re in a workplace where the WordPress/Gmail integration needs to survive your departure, the integration would need to be set up on a more general account that doesn’t get closed when people leave. If there’s an IT administrator who can take all these considerations into account, then Google Workspace Gmail, set up with OAuth, might work.

It really depends on your setup. If you still want to go with Gmail, check out our article at How to connect Contact Forms 7 to a Google Workspace Gmail.

As an alternative to Gmail, you could choose a freemium SMTP service provider. Run a Google search for smtp email service to find lists of these.

Once you’ve registered for a service, the process for hooking up Contact Form 7 to it is:

  1. Choose and install a Wordpress mailer plugin. The SMTP service you chose above might offer a native one, otherwise just use SMTP Mailer for its simplicity, as a starting point). You can very easily switch out to a different one if you need more features.
  2. Configure the mailer by following its instructions and inserting the credentials provided by your chosen SMTP provider.
  3. Test the mailer (the one linked above has a built-in tester and session display).
  4. Test Contact Form 7.