WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just added Contact Form 7 to my site. I'm using the default configuration (didn't change any setting). The mails are classified as spam in my Gmail inbox. Is there any way of making them go directly to the inbox?

share|improve this question

closed as off-topic by Pieter Goosen, Mayeenul Islam, TheDeadMedic, Robert hue, birgire Feb 28 '15 at 22:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Another option is to install this wordpress plugin, will fix the issue very quickly wordpress.org/extend/plugins/wp-mail-smtp – user24073 Nov 26 '12 at 10:25
up vote 2 down vote accepted

@janoChen, The problem could be that your email server is not using Domain Keys or a valid spf record

DomainKeys is an e-mail authentication system that allows for incoming mail to be checked against the server it was sent from to verify that the mail has not been modified. This ensures that messages are actually coming from the listed sender and allows abusive messages to be tracked with more ease.

DomainKeys can be set up in Cpanel under Email Authentication

SPF will specify which machines are authorized to send email from your domain(s). This means that only mail sent through this server will appear as valid mail from your domain(s) when the SPF records are checked.

SPF records can be set in Cpanel or by adding the record to your DNS. A sample SPF record looks like this:

v=spf1 a mx ip4:xxx.xxx.17.118 a:my.servername.com ?all

This tells email servers that the specified ip address and host are permitted to send mail from my domain.

The Configure SMTP plugin will set up WordPress to use SMTP authentication to send out mail. It also has an option to use Gmail or Google Apps to send WordPress mail.

Check the email headers to find out why your messages are going to spam

In Gmail you can view the headers which will tell you the problem with the message by clicking the drop down arrow under replay and selecting "show original".

alt text

Here is a header example from some "Viagra" spam in my spam box:

Received-SPF: neutral (google.com: is neither permitted nor denied by best guess record for domain of chris@buymmoaccounts.com) client-ip=;
Authentication-Results: mx.google.com; spf=neutral (google.com: is neither permitted nor denied by best guess record for domain of chris@buymmoaccounts.com) smtp.mail=chris@buymmoaccounts.com
share|improve this answer

This maybe a problem with your server. If several sites are hosted on your server (shared hosting) and some of them send spam emails, it is possible the IP of your host is blacklisted.

A solution would be to use an SMTP server. This plugin will be helpful: http://www.callum-macdonald.com/code/wp-mail-smtp/. You just need to configure it so that your WordPress installation uses an SMTP server for all the emails (including those sent by Contact Form 7).

share|improve this answer

Well that's the hard way to do it, the easy way is just click the not spam button a couple of times so google will remind your address is not spam.

If you're doing an email marketing, then it'll be a problem if your email address are marked as spam, but if your email is just used as a contact mail from wp, then simple solution is just fine.

I've had this problem a couple of times, the not spam button work ok for me

share|improve this answer
This does not address the issue at all, this is fixing a symptom, not the disease. – Toby May 2 '12 at 22:50

I tried with WP Mail SMTP plugin. But still no success. When I use SMTP, I am getting error as "Failed to connect SMTP". I am using Google Apps for Work.

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – tfrommen Feb 27 '15 at 4:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.