Blog: WordPress
Old Mailbox with Bullet Holes

Fix Contact Form 7 Emails Going To Spam In Gmail

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown SEO.

Contact Form 7 is a common plugin used on WordPress websites.

It works great for simple contact forms.

But recently, I noticed many Contact Form 7 emails going to spam in Gmail.

I figured out how to fix this in my situation. Here’s a few troubleshooting tips to try when you’re debugging this problem.

“From” Address is Flagged

In Contact Form 7 (version 4.0.1 and above), newly generated contact forms use [email protected] for the From email. Gmail tends to flag this as potential spam. One thing to try is adding an email account to your site, and using this address under Mail > From on the Edit Contact Form screen.

Contact Form 7 Mail From Settings

You can set up new email accounts on cPanel by going to Mail > Email Accounts. Add this email address to your Contacts in Gmail. Adding contacts tells Gmail that messages from those addresses are a priority.

If you have a Gmail address in the Mail > From box on Contact Form 7, Gmail may flag this as a phishing attempt. It does this because the From header says the email is coming from a Gmail server, but Google sees that the message is coming from your server. Making sure the From email header and the originating email server match will keep it from being flagged as suspicious.

Most of the time, this will be enough to solve the problem. If you still have issues with your Contact Form messages going to spam, here’s a few more things you can try.

Create Gmail Filter

Many people don’t know you can create filters on your incoming Gmail. This is actually something I would like to learn more about and utilize.

To keep your contact form submissions out of spam, send a test email from your website contact form. Find this message (or another contact form email) in Gmail and open it. In the top right drop down menu, select More > Filter messages like these. You can make this as specific as you want, but for now, just make sure your special contact form email is in the Filter From input box. You’ll be creating a rule for any messages that come from this email address. Click the link in the bottom right of this window that says Create filter with this search ».

Gmail Filter Never Send Emails To Spam

Check the box Never send it to Spam. If you have Labels set up (like folders for email), you can set that here. You may choose to check Always mark it as important or apply the same filter to any existing emails from the same address. Finish by hitting the Create Filter button. See if this works by sending a test message from your contact form.

Gmail Filter Never Send To Spam

If your contact form emails are still going to your Spam folder, there’s one more thing you can try.

Send Mail via SMTP

WordPress defaults to sending email through PHP mail(). Sometimes, changing this protocol to SMTP will keep email from your website out of your spam folder. There are several plugins that will help you do that. Many people have sworn by the WP Mail SMTP plugin, which as of this writing, is compatible up to WordPress version 4.7.2.

Did this solve your contact form problem? Let me know in the comments below.

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown SEO.

71 comments on “Fix Contact Form 7 Emails Going To Spam In Gmail

    1. Hello!

      Thank You so much! Your tutorial solved my problem creating a filter on Gmail. Congratulations, it is an excellent source for WordPress.

  1. Great help. I have created a filter which has solved the problem for now, but google gives me an alert saying “this hasn’t gone to spam due to a filter” which means gmail is still trying to place the messages from spam.

    Also did you ever manage to find out what was the point of that island? What was the meaning of the hatch door? and why could you walk again?

    Thanks John Locke your advise helped.

  2. Hello Andrew:

    What I also do for contact form email up is create a separate email for the contact form, and add that to my Gmail contacts as a white-listed email. If you have a filter that says Never Send To Spam, it shouldn’t end up there.

    If Google is trying to automatically filter emails, try adjusting the Subject line to something different. I’ve read that there are all sorts of strange triggers that flag messages for spam, such as putting three exclamation marks in a row.

    I think the island was a metaphor for our metaphysical state as spiritual beings in a physical world. The canonical interpretation is in the eye of the beholder. I think the Hatch is a symbol of Heaven and Hell (the shaft of light). Desmond Hume is also a nod to David Hume, author of Leviathan.

  3. Your information was so valuable!! Thank you so much for guiding us in the right direction. This saved us hours of figuring out what to do. Great post!

  4. Hi Ricky:

    If you make sure the email sending the contact form information is a branded domain originating from the same same site, most of these problems will disappear for the majority of email providers.

    1. Hi Adnan:

      The same principles apply for Outlook as they do for Gmail, though every email client has a little bit different settings. The major things to do:

      – Make sure your From email has the same domain as your website. No Gmail, Yahoo, or Hotmail emails!

      – Send your contact form email via SMTP. The default WordPress function for sending email is wp_mail(), but often times this is not sufficient to bypass Spam filters.

      You can use a plugin like Post SMTP Mailer/Email Log or Easy WP SMTP to do this. You can also use a paid service like SendGrid to accomplish this.

      – If you are sending contact form emails to yourself, white-list the email address you are using to send emails to yourself. You can also use filters if your email service has them to keep emails from that address out of Spam.

  5. I cannot get Contact Form 7 to send an auto-response to a GMail address. I’m using the [your-email] tag in the “To” field of the “Mail (2)” form. I receive the auto-response at email addresses that aren’t GMail. But the ones that should have been sent to GMail are nowhere to be found – not in spam. Any ideas?

    1. Hi Doug:

      There are some things you will want to troubleshoot that are mentioned in the article.

      Make sure you are sending email from your site using a domain branded email address. If is your domain, then make sure the outgoing email address is using the same base domain.

      See if there are any configuration errors in Contact Form 7. They are trying to anticipate any things that will set of the spam filters in various email clients. Make sure you have the latest version of Contact Form 7, and you have no configuration errors.

      You can also use the GMail API to send email via SMTP through your site. Here is a plugin that will help you get started.

      There are many things that can trigger a spam filter in email clients. These are some of the things I have encountered in the past that eliminate non-delivery of email.


      Take a look to see that your connections between your email service and your website are correct. Some websites have email on the same server, some require you to use a third-party service. Some people use Microsoft 365 or GoDaddy email to connect to their website.

      Whatever you are using, make sure that you can send and receive mail correctly from your website. Connecting this can sometimes be a hassle.

      If everything so far looks correct, you might have to use SMTP to send your auto-response emails.

      What type of SMTP service you can use will depend a lot on where you are hosting, and what email ports they have open.

      I have used Post SMTP Mailer/Email Log to configure email in the past, but there are other WordPress SMTP plugins as well.

      If your hosting service does not have the usual ports open, you may have to spend a small amount each month on a SMTP service like MailGun or SendGrid.

  6. Hello!

    I have created a webiste for a client, and I live in Sweden and she does as well. People are supposed to send emails to her from different places around the world and also here in Sweden where we sometimes use and but every email I try to send from my personal address is marked as spam and she uses Hotmail. I use a honeypot to stay away from spam, but I don’t want the messages she receives gets stuck as spam and I’m not sure how to fix this. I don’t understand how I should do with the “From” since she only has one email address and I don’t know how WP Mail SMTP works either.

    Hope you will be able to help me!

    1. Hi Lisa:

      So, to keep stuff out of the Spam folder, here are a few things to keep in mind.

      1) Most email clients (Gmail, Outlook, etc.) are looking for an email that has the same domain name as the website sending it. If I am understanding your question correctly, your client may be using their own email (Hotmail or Gmail) for the From address for outgoing mail.

      Your client needs to invest the $5/mo in getting an email address that is domain-branded (has their domain name). GoDaddy email, Microsoft 365, Zoho Email, and G Suite (Google Apps) can all do this for a reasonable amount. If they have a cPanel for hosting, they may also be able to this from their hosting server.

      2) If your client is on a host that requires them to get email separately, like WP Engine, then Step 1 is mandatory.

      You will need to configure the third-party email to work with SMTP on your WordPress site. Your third-party email services will give you the information you need to put into your SMTP WordPress plugin, such as outgoing server, and available port numbers.

      Setting up SMTP email delivery between a third-party service and your website usually require you to change or add certain records to your DNS (domain name records). These would be your MX records (these control the email servers), SPF record (Sender Policy Framework, controls what servers can send email from your domain name), and DKIM (DomainKeys Identified Mail, email authentication that prevents spoofing).

      In some cases, you may need to use a SMTP service like SendGrid or Mailgun to deliver email via a third-party SMTP. You will have to add records to your DNS in the same fashion.

      Leave yourself enough time to test these configurations. DNS records take up to 48 hours to change (though DNS through GoDaddy is usually within fifteen minutes or so).

      Email clients are really cracking down on any emails that look suspicious, and filtering those directly to Spam or Junk. So make sure you are sending from an email address that includes the domain name, and make sure you have a plan in place to deliver email via SMTP if your server is not delivering mail correctly from your WordPress site.

  7. You are so sweet – thank you! Everything seems to be working now because I downloaded an anti spam filter from honeypot so nothing gets stuck. The only problem I have now is the fact that Contact Form 7 doesn’t write who sends the emails. It only writes [your-name] and then WordPress and I have no idea how to change it. What should I change “from” to? I’ve read that some people write “[email protected]” but that doesn’t work for me. And my client has a hotmail adress but I’m not supposed to write her hotmail adress in the from field right? Because if I do it will say every mail comes FROM her when it’s supposed to come TO her.

  8. Hello John!

    I installed the WP Mail SMTP plugin, set up to send email to launch SMTP with SSL logging encryption and now my emails are not marked as an SPAM.

    Thanks for your tip!


  9. John Locke like the philosopher right? Pretty Cool!

    Listen, thank you for this impressively detailed post. I have indeed learned much about this issue & intend to apply it towards my new projects going forward.

    BUUUUT, your advice hasnଁt worked for me. And I spent over an hour straight diligently trying to solve the issue. Man, Iଁve decided to call my Hosting Provider.

    However, to show my appreciation for your efforts I will tweet out your post link & throw in a promotional blurb. Although it did not work for me, I remain thankful to you for your efforts.

  10. Hi Otis:

    Yup, I was named after the philosopher, great catch.

    What exactly is going on with your contact form situation? Perhaps I can give you more specialized advice if I know what your website configuration looks like.


  11. Hey John,

    Thanks so much for this article! We implemented this fix on a client’s site who was having their contact forms go into Spam and now it works!

    However, there’s something new that cropped up. The contact form is now getting a ton of submissions with no messages and the Name fields are a random string of numbers and letters. They are definitely spam and they are coming in every 30 minutes or so, it’s very frustrating.

    Have you heard anyone else experiencing this issue? We’ve even added a captcha to prevent it, and they are still getting through.

  12. Hi Matt:

    If your client is still experiencing spam with Contact Form 7 with the CAPTCHA, there are two things I would recommend.

    First, you can use Akismet to filter contact form spam with CF7. There’s a tutorial on how to implement that here.

    Second, you can use a plugin called Contact Form 7 Honeypot to keep out spambots.

    Let me know if these solutions work for your client. I understand that spam submissions can be very frustrating.


    1. Unfortunately both of those fixes didn’t seem to work for us. The emails come through with all similar From: fields:

      From: 590c6c975ed0b
      From: 590c60fa578e2
      From: 590c4028035b6

      And so on.

      They come in sporadically, but usually no longer than an hour apart. The emails mostly look legitimate. If I were guessing, the closeness of the From: lines, it’s as if the form is sending an email whenever a user visits the site. But I don’t know how that would happen, if all we did was perform this fix.

  13. Hi John,

    Isn’t that workaround a problem for majority of those who want to use forwarding of inbound emails. What If I want to forward those emails automatically to my CRM but because the from email address is of my own, it is impossible to get it correctly added in my CRM since the CRm software thinks its my sending an email to myself.

    This is so frustrating problem. Is there a workaround to this?

  14. Hi Ken:

    Contact Form 7 is the most popular form plugin because of two reasons: it is free, and and it does one job reasonably well (fires off an email from the contact form).

    However, if you are running any sort of business that relies on your contact form for leads, it is the wrong tool to be using.

    For one, Contact Form 7 only fires off an email to the admin email. It does not store contact form submissions in the database.

    If you want to do CRM integration, then you are already investing in the CRM tool, and you should invest in a forms plugin that allows you to integrate with your CRM.

    My advice for you is to invest in a Business or Developer license from Gravity Forms, because that will give you access to their library of add-ons. Gravity Forms supports integration with most of the major CRMs through their add-ons. Contact Form 7 does not.

    Hope this helps point you in the right direction.


  15. Thanks John, you were the only one able to clarify how to fix this issue. It was very rewarding to make the updates in my gmail account for me and my client!

    1. Hi MJ:

      Hooking up SMTP is an entirely separate process. That sounds like a subject we can address in another post. But for now, to hook up SMTP, you have to:

      1) Make sure that your host has a port open for sending over SMTP that is supported by your plugin.

      2) Add your email login (the credential you would use to actually login to your email account, not hosting or WordPress) to the SMTP plugin fields.

      3) Add the correct ingoing and outgoing servers. Your host or 3rd party email (Gsuite, GoDaddy email, etc) can usually point you towards these.

      4) Choose the appropriate protocol to send over (usually SSL).

      5) Send a test email.

      Note: You may also have to add a SPF and DKIM record to your domain name records. This tells the domain name that a particular server can send email using the domain.

      I’ve had success with the Post SMTP Mailer/Email Log plugin in the past on many different sites. For me, this is the easiest walkthrough for setting up SMTP.

      If you’ve never set up email or SMTP from a site before, it will save you time to reach out to someone you trust to help you set it up. If you know someone locally who can help you out, that will help a lot.

  16. This is incorrect:

    “WordPress defaults to sending email through a protocol called POP3. Sometimes, changing this protocol from POP3 to SMTP will keep email from your website out of your spam folder.”

    POP3 is only used for retrieving mail, and cannot be used to send. WordPress defaults to using PHP mail(), not POP3, and sometimes changing over to SMTP will help avoid being flagged as spam.

  17. Does this also work for the Contact Form 7 Autoresponder? Meaning, when someone submits information into the form and there’s an auto response from the website?

    1. Hi Dee:

      What happens with the autoresponder message will depend on how you have it set up.

      The lest optimal path is if you have something like GoDaddy email, and are using the autoresponder from there. Your best bet is to use the Mail (2) in the Mail tab of CF7 as outlined here.

      I haven’t used CF7 on this site in a long time. Instead, I’m using Gravity Forms with the message that shows up when you compete the form.

    1. A lot of the email services have different things that trigger email going to the Spam folder. These are some of the things I’ve found that help keep your emails out of that situation.

    1. Hi Rebrt:

      This article is about keeping CF7 emails to your inbox out of your Spam filters, so that you receive messages from people trying to get a hold of you.

      Unfortunately, there’s no bulletproof method of ensuring that autoresponder messages that your website sends always go directly to their inbox, and stay out of Spam.

      There’s simply no way to know what everyone’s individual spam settings are with the myriad of email clients that exist. (If I’m understanding your question correctly).

      My advice would be, make sure that you have a sending email address that matches your website, use SMTP to deliver email from your website, and avoid things that are known to flag email spam filters (all-caps subject lines, excessive exclamation marks, etc).

      I would look at this article on avoiding spam filters, if your email recipients are missing your auto-responses or other emails.

  18. Excellent Job!
    I was suffering from this spam job.

    Now I am done!
    What did I Do?
    I just created a webmail from my cPanel and used it to CF7 From field ([your-name] ) and Done.

    I also added the webmail with my Gmail to make the job super easy,
    Now I can receive mail in my Gmail inbox and reply from them.

    No need to login to my panel several time to check emails from my website.

    If you still feel complex or still undone Just Reply me here I will help you in a timely manner until your problem is solved. Thanks.

  19. John,

    Thank you so much for your support! I fixed this successfully.

    But I have one question. The time between the sender clicking Send in Contact Form 7 to the time I receive the notification in email so long.

    How would I decrease this time ?

    1. Great question Tùng.

      If you are using SMTP through a regular email address, then the delay in receiving the email is probably due to the SMTP relay of the service you are using for email. If you are not using a third-party server, but are using an email address through your server (like cPanel), then I would double check how often the SMTP relay runs.

      Out-of-the-box, WordPress defaults to using the email address [email protected] and uses the built in mail() PHP function.

      Going through SMTP usually means that message gets delivered faster.

      If the contact form is using a domain branded email address, that is not the default [email protected] email address, this is what happens when the contact form is submitted.

      The form data is sent to the SMTP server for delivery on the next relay. This usually only takes a minute. If it is taking longer (like an hour or more), then the SMTP relay may not be set to deliver more often than that.

      This is where I would check if you are experiencing delays in receiving contact form notifications, with Contact Form 7 or any other contact form plugin.


  20. This really helped me to save some of my essential emails. Actually we were receiving emails in spam in Gsuite and emails were also coming into our daily checking Outlook. But due to spam in Gmail we were not receiving those in Outlook and were missing out of our eyes. After following the filter option now we received these into Outlook 🙂

    Great explanation sir.

  21. Hey John, I looked over your tips for addressing Contact Form 7 emails going to spam and believe your solutions could be related to my issue with emails going to spam, but am not 100% sure.

    Messages are going to spam because Google say’s it can’t verify the sender. One example has Jane Doe as the sender ([email protected] is the email we want the form submits to go to). But Jane Doe isn’t in our domain. Also on the form itself it never includes the email address in the correct field. I think these are related.

    Could you please assist me with how to correct this and if perhaps I have the settings configured incorrectly?

    Thank you!

    1. Hi Drew:

      It sounds like you need to check your CF7 form for configuration errors. From what you’ve described, something is in the wrong place. The email address that is sending the email should (at a minimum) be from KitchenDesign com. If the email address sending CF7 is that of the person filling out the form, it will go to Spam.

      All email clients expect to see the same domain for the sending email address and your site. Many people use the CF7 Reply-to Header to reply to the contact form directly from their email inbox. This prevents the email from looking like a phishing scheme.

      Ideally, you are using a SFTP plugin to send contact forms using a branded email address (such as site @ KitchenDesign com) with a service like Google Workspace or Microsoft 365. These are about $6 to $12/mo.

      I recommend using a Google Workspace email with Postman SMTP. Set up instructions are here:

      Hope this helps.

      – John

      1. Hey John, thank you for the helpful information! What’s strange is the from email is our email ([email protected]), but it has the senders name in front of it. We are using Gmail through Google Workspace for our business emails. Below are my current CF7 ‘Mail’ tab settings.

        To: [email protected]
        From: [your-name]
        Subject: [your-subject]
        Additional headers: Reply-To: [your-email]
        Message body:
        From: [your-name]


        Phone: [your-number]

        Location: [your-location]

        Subject: [your-subject]


        This e-mail was sent from Contact Us at

Join the Conversation

Your email address will be kept private. Required fields marked *.