Contact Form 7 Not Sending To Gmail or Google Apps

Michael KeatingWordpress Tips19 Comments

contact form 7 and gmail

It seems that almost daily I encounter an obstacle with one of the many websites I own or manage (like Octatools). With each obstacle comes a learned solution that further evolves my ability to be a successful entrepreneur and effective digital marketer. Recently I encountered an issue with the very popular Contact Form 7 plugin used with WordPress. Let’s dive into it.

Table of Contents

For quick access just click the links below to jump to the desired section:

Not Receiving Contact Form 7 Emails in Gmail

I recently completed a new website for a client and the theme came bundled with Contact Form 7 to handle all of the forms on the website. I set up it up as I always do using the client’s email address in the To field within the Contact Form 7 form settings. When I went to test the form, I received the autoresponder associated with the Mail (2) which led me to believe the form was working. The client however, didn’t receive my test submission so something was off. I assumed there was a disconnect between the contact form and the client’s Gmail inbox associated with the desired email address.

Reasons Email Not Being Receiving From Contact Form 7 to Gmail

When looking at this equation, there are really 3 main pieces. The first being the contact form itself, the second being the hosting provider/server, and the third being Gmail/Google Apps. The process goes something like this:

User submits form via Contact Form 7 > form contents go to server > server passes form contents to Gmail

Now knowing how this simplified version of the equation works, I began taking steps to resolve the issue with Contact Form 7 not being received in Gmail.

Troubleshooting The Issue With Contact Form 7

With all troubleshooting or problem solving, you need to start with the end goal and work backwards. In this case, the goal was for the client to receive the form submission from Contact Form 7 to his email address xxxx@clientdomain.com via Gmail. The only area that controls this piece of the puzzle is the To field within the Contact Form 7 form settings.

Researching Possible Solutions With Contact Form 7 Error

Now that all of my personal attempts were exhausted, I decided to do a quick browse on Google to see if anyone else had a similar issue. I found a variety of articles about the topic most of which didn’t apply exactly to my specific situation. However, other common issues for Contact Form 7 not sending could be attributed to the following:

Email Landing In SPAM Folder

Depending on the settings of the server or Gmail, some emails such as this one could land in SPAM. The likelihood of this occurring the first few times an email comes in to an inbox is much higher.

Action: I reached out to the client to ask if any of the emails were found in the Gmail SPAM folder, All Mail folder, or another random folder they could have possibly set up.

Result: The client didn’t find the emails from Contact Form 7 in any folder. They also performed a search looking for the title of the incoming email and found nothing.

Email Being Filtered In Another Gmail Folder Or Blocked Asset

It is possible that there are Google filters turned on which will route an email from the inbox directly to another folder or location. It always could be listed as a blocked asset in your Gmail settings.

Action: I reached out to the client to ask them to check their Settings > Filters and Blocked Assets section within Gmail. There is a random possibility the filter is rerouting the email or it was blocked on accident.

Result: The client didn’t see the email address as a blocked asset or any filters that could be relocating the email.

Javascript Conflicts

This can be difficult for the non-coders out there so I recommend using a plugin to check for javascript conflicts or errors that would prevent Contact Form 7 from sending properly.

Action: I added the Chrome extension called Javascript Errors Notifier which will tell me if there are errors on the page where the contact forms reside.

Result: There were no errors found by the Chrome extension which mean there were no Javascript conflicts present on the pages with forms.

Plugin Conflicts

If you use WordPress often, you know there is always the possibility that a plugin is causing another plugin to not work properly. In this case, another plugin could be preventing the email from being sent to the domain associated with the WordPress install.

Action: I deactivated all plugins aside from Contact Form 7 and filled out the form.

Result: There was still no email showing up in the client’s Gmail account, but I was still receiving the email to my personal email since it was set as a Cc address.

Contact Theme Developer

This is one I rarely do because it usually is pretty worthless. However, some themes have very reliable support so they can help diagnose the issue. I didn’t go this route with my client, but I wanted to list it for those who are trying to find possible solutions to their Contact Form 7 errors.

Testing Possible Solutions For Contact Form 7 Error

Before hitting Google and trying to find an answer, I decided to test out some of my own solutions since I’ve used Contact Form 7 on dozens of sites. Here are some of the resolutions I tried to overcome the issue of Contact Form 7 emails not showing up in the clients gmail:

Added My Email Address As CC In Additional Headers

Contact Form 7 lets you add commands/rules in the Additional Headers section such as cc or bcc in the event you want other individuals to receive form submissions.

Action: I added my personal email into the Additional Headers section as “Cc: xxxx@mydomain.com”. I then submitted the form again to see if I would receive it in my Gmail inbox.

Result: I received the form in my personal Gmail account, but the client didn’t receive the form in their inbox. This helped me isolate the issue to their Google Apps account as opposed to the Contact Form 7 plugin.

Added My Personal Email To Contact Form 7

Knowing that my personal email address was receiving the form as Cc, I decided to test my email address in the To field.

Action: I added my personal email address xxx@mydomain.com to the To settings of the contact Form. I then submitted the form to see if I would get the message in my inbox.

Result: I received the email in my Gmail inbox which meant the form was sending properly. This helped me further narrow down the problem to being an issue with email addresses associated with the clients domain.

Added < > Around Email Address In To Field

With Contact Form 7 there can be syntax errors that result from form misconfiguration. For example, the From field should look something like “[your-name] “. If you don’t include the <> it will cause the form to not function properly (this wasn’t our case as I solved that issue previously).

Action: I added brackets <> around the clients email address in the To field so it looked something like this ““. I also left my personal email address as Cc in the Additional Headers section.

Result: I received the message in my personal email address, but the client didn’t receive the message. This was a failed attempt and I admit it was a long shot. You never know with technology though so it’s always worth a try.

Added Another Email Address Associated With Client Domain In To Field

Although I was almost certain it was all email addresses associated with the client’s domain, I decided to confirm my assumption. After all, it’s best to exhaust all options when trouble shooting problems.

Action: I add a different email address associated with clients domain in the To field. I again left my personal email address as Cc in the Additional Headers section.

Result: The same result occurred as with all other attempted solutions. I received the message in my personal email Gmail inbox, but the client didn’t receive the message.

Solution To Not Receiving Contact Form 7 Emails in Gmail

After all of my research and testing I was able to finally solve the issue of Contact Form 7 emails not showing up in my client’s Gmail. There are two possible solutions and the preference of which one you decide to use is up to you. One solution is a quick fix that the Google Apps team recommended to me. The other is very common in articles and forums on the web..

Fixing Contact Form 7 Error Without A Plugin

I decided to use this method to fix the error with my client’s email via Gmail. Here are the steps I followed to resolve the issue:

Step 1- Login to your Google Apps or now Gsuite account.

login gsuite

Step 2- Once logged in, got to the Users section.

gsuite users

Step 3- Select the User associated with the email address where you want the Contact Form 7 form to go.

gsuite user profile

Step 4- On the desired User page, select Account.

gsuite profile account details

Step 5- Scroll down until you see Aliases.

Step 6- Locate the Alias that looks like this: xxxx@clientdomain.com.test-google-a.com and copy it

aliases in gsuite

Step 7- Login to your website and visit the Contact Form 7 form you’d like to update.

Step 8- Go to the the Mail settings on the respective form and paste the copied email in the To section.

contact-form-7

Step 8- Visit the website in questions and submit a test form to make sure it is recieved in your Gmail account.

Google explained to be on the phone that my inserting xxxx@clientdomain.com.test-google-a.com directly into Contact Form 7 it would by pass the host and land directly in Gmail. Here is a quote from their message to me…

As per our call today, we were able to get the emails from the contact form using our extension, using “xxxx@clientdomain.com.test-google-a.com” this extension is also use when setting up Dual delivery, Legacy server first, however you can take advantage of it on your form, it all will work the same way. Review more about this temporary email address at https://support.google.com/a/answer/178332?hl=en&ref_topic=2794464“.

I recommend anyone looking for more information to visit the support link above where Google provides much more technical information about the matter.

Fixing Contact Form 7 Issue Using a Plugin

If you don’t want to use the quick, dirty method above and want to use a plugin to resolve the error with Contact Form 7, I recommend using the following plugins with the referenced guides:

Postman SMTP Mailer/Email Log Plugin

This plugin is described as “Postman is a next-generation SMTP Mailer, software that assists in the delivery of email generated by your WordPress site. Postman is the first and only plugin to support the latest security standards. With OAuth 2.0, there is no need to store your email passsword in the WordPress database where it might be found.”

RESOURCES

WP Mail SMTP Plugin

This plugin is described as “This plugin reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page that allows you to specify various options.”

RESOURCES

Gmail SMTP Plugin

This plugin is described as “Connect to Gmail SMTP server to automatically send email from your WordPress site. Configure wp_mail() to use SMTP with OAuth 2.0 authentication.”

RESOURCES

  • http://www.wpbeginner.com/plugins/how-to-send-email-in-wordpress-using-the-gmail-smtp-server/

Conclusion To Solving Contact Form 7 and Gmail Error

While each situation is unique, I believe this blog post covers almost every option available to help troubleshoot and solve any issues pertaining to Contact Form 7. Given that most users take advantage of Gmail and Google Apps for their email needs, this should also help the majority of those readers as well. If you haven’t already, I highly recommend you check out our email scraper and other SEO tools.

Please lend your expertise in the comments as the web is always changing and it will only help the community!

About the Author

Michael Keating

Twitter Google+

Mike is a prolific digital marketing strategist, entrepreneur and SEO specialist who understands how to drive results using integrated digital strategies. He is one of the founders of Octatools and is excited about the opportunity to help DIY SEOs and business owners get results online.

19 Comments on “Contact Form 7 Not Sending To Gmail or Google Apps”

  1. .test-google-a.com is not working for email of my domain which is configure with google apps. is there any solutions?

    1. Hi Paresh,

      I’m sorry to hear it isn’t working for you. If you are paying to use Google Apps, I’d contact their support. They will be able to test the servers and identify a solution for you. Without knowing all of the specifics, it’s difficult for me to be much help.

      Cheers,
      Mike

  2. Thanks Mike! You saved me some time troubleshooting this BS. Amazing that G Apps for Biz WOULDN’T let the messages through. Can you say “Confused Client?” !!!! wow haha.

    Have a good weekend my man,
    -R S

    1. Has nothing to do with Gsuite team / app, but how emails are handled on website (php) and server hosting it (mail server).

      As Michael desribed it : User submits form via Contact Form 7 > form contents go to server > server passes form contents to Gmail.

      So if there is a mail server on the webserver hosting the website, when a form is submitted to a recipient with same email as domain name, the server will look for that recipient on the server, because it will assume the email account has been created and exists on the mail server and therefore will not forward using MX records.

      If you look at you server logs, like the mail queue for example, you’ll see :

      The email account that you tried to reach does not exist. Please try\n550-5.1.1 double-checking the recipient’s email address for typos or\n550-5.1.1 unnecessary spaces. Learn more at\n550 5.1.1 https://support.google.com/mail/?p=NoSuchUser m12si1516290wrb.65 – gsmtp

      The proof is if you put any other email address but one ending with domain name in the To or Cc field, emails go through. This is why adding .test-google-a.com works, because it’s an alias, and server will not look for that recipient on server and forward using MX records 🙂

      Nice article btw, I would add in your steps checking logs (exim etc, if you have access to them of course).
      They are a great shortcut as weel to find solution.

      Cheers

  3. This really is the most helpful article I have found on this. I have been working for days on the same issue for my client. I have many websites using contact form 7 and this is the first time I have seen this issue so I sure its something Google will have to work out. Thank you for writing this!

  4. Using the alias (just called Alternate Email now or at least in my client’s gmail account) worked perfectly — thank you so much!

  5. I have been struggling with forums trying to find the solutions for weeks. So many wasted hours with server support teams etc. This article needs to be listed under one of Godaddy’s help pages.

    Anyways, thank you so much for the very detailed explanation. Save my day ( or weeks 🙂 )

Leave a Reply

Your email address will not be published.