Contact Form 7 Email Issues

Though the Contact Form 7 (CF7) plugin successfully sends millions of emails every day, there are a host of issues that can delay or stop emails on both the sending and receiving ends of a typical email.

This article was set up to help people, who are having trouble sending and receiving emails from CF7, solve their problems.

Contact Form 7 successfully sends millions of emails every day

Emails from CF7 work flawlessly, without any effort, for most people

We ourselves have never had a problem sending or receiving emails from Contact Form 7. Its always worked flawlessly, on a large number of websites, on a few different servers, with no need for any changes to the default setups. It just works and always has.

We believe most users of CF7 have the same experience. CF7 having over 19 million downloads (currently around 15,000 per day), indicates that a lot of people are successfully sending emails from CF7.

But not for everyone – emails don’t work easily for some CF7 users

If you spend some time in the CF7 support forum you will see a lot of posts from people who do have problems with sending our receiving emails from Contact Form 7.

Contact form is not working …
… form not sending
Refuses to send email … etc.

The important point to note is that the sending and receiving of emails depends heavily on both the server where your WordPress installation is hosted and the email configuration of the local computer where the emails are supposed to be received.

If you are having CF7 email problems, you will need to investigate this issue in detail for your particular local configurations. You have our sympathy, this can be a difficult and time consuming task and you may not, in the end, get it to work.

BUT … it ain’t the plugin that is causing your problems. The plugin works!

Please try to keep that in mind as you work through some of the possible causes and solutions given below.

Tl:dr (too long; didn’t read) version

  1. Test if your WordPress installation is able to send emails
  2. Hosting Issues
  3. Alternatively – try to configure email using SMTP
  4. Ensure proper return address is used
  5. Your email may be treated as spam
  6. Use a CF7 Submission Storage Plugin
  7. Plugin or Theme Conflicts
  8. JavaScript Conflicts
  9. Yahoo DMARC Issue

Sending

Contact Form 7 uses the standard recommended methods used to send emails in WordPress.

The following list contains items that we have found commonly lead to email sending problems with the CF7 plugin (and WordPress in general). We suggest that people work through this list from top to bottom to try to solve their particular email sending issue.

If you are unable to send emails from the CF7 plugin, it is likely that you are unable to send emails from WordPress in general.

You need a functioning mail server

If you are trying to send emails from any WordPress installation, you will need to make sure you have a functioning mail server setup there.

Note: Local installs (using MAMP, WAMP, XAMPP etc.) often don’t have this capability. Trying to test CF7 email functionality on a local WordPress installation with no mail server capability appears to be a common mistake.

Test if your WordPress installation is able to send emails

Try going through the “forgot password” function on wp-login.php.

lost-password

Do you get the email? If you don’t you will need to rectify this.

The WordPress Codex gives some guidance on this at http://codex.wordpress.org/FAQ_Troubleshooting#E-mailed_passwords_are_not_being_received

Contact Form 7 uses wp_mail to send emails. Most quality WordPress hosting will generally support this without the need for any special configuration.

wp_mail is based on the standard PHP mail() function, which uses sendmail. No account information is needed.

If you are a comfortable working with PHP, you can check if wp_mail is functioning by following this article – http://butlerblog.com/2012/09/23/testing-the-wp_mail-function/.

Note: For wp_mail to work, the settings SMTP and smtp_port (default: 25) need to be set in your php.ini file.

Hosting Issues

Some hosting providers require special settings to be applied to your WordPress installation in order to send emails from WordPress. You may need to contact your hosting provider and work with them to ensure emails are being sent correctly from your WordPress installation.

Some hosts don’t support PHP’s mail function. They often claim it’s to reduce spam since the PHP mail() function can be used to send email defining the from address as whatever you want without having to authenticate.

You should be able to get confirmation from your hosting provider that php mail() is functioning correctly from your hosting account.

Alternatively – Try to configure email using SMTP

If your hosting provider does not support wp_mail and the standard PHP mail() function, you can try to configure email sending from WordPress using SMTP (another type of mail service).

WordPress supports SMTP mail but this needs to be configured separately via the admin area of WordPress.

The following plugins can be used to setup SMTP on your WordPress site:
http://wordpress.org/plugins/configure-smtp/
http://wordpress.org/extend/plugins/wp-mail-smtp/

WP Mail SMTP reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page that allows you to specify various options. You may need to contact your hosting provider to get detailed information on the option settings required.

With SMTP you can also send emails via an external email provider such as Gmail, Zoho Mail, Outlook or some other online email service, and send outgoing email through their SMTP server rather than from the email service on your WP hosting.

See Install WP Mail SMTP to send all emails through an external SMTP server for some detailed instructions on using SMTP via an external email provider.

Note: When using SMTP you need to authenticate, so there has to be a real email address that the emails are coming from.

Most users on quality WordPress hosting will not need to use SMTP. You should avoid using SMTP if possible as using SMTP can contribute to email authentication issues.

Ensure Proper Return Address is Used

The From: address used in the Mail section of the CF7 interface can be important in determining if an email is able to be sent via the CF7 plugin.

Some hosting requires that any emails being sent via WordPress are from a valid email address on your local domain.

If you leave the From: address in the Mail section of the CF7 interface empty, then by default, the WordPress mailer fills in the email’s From: field with wordpress@yourdomain.com and the email’s From: name as WordPress.

If you setup wordpress@yourdomain.com as a real e-mail address on your account, your host should pass the email on for delivery. In fact it will probably send your mail as long as yourdomain.com is setup to send and receive mail, even if wordpress is not a valid mail box.

But if you set you real email address as the From: address (and it’s something like wpgod@gmail.com), the mail may not send because gmail.com is not a domain handled by the mail server.

To use an email address like wpgod@gmail.com you may need to setup SMTP to send emails via an external email provider. See Install WP Mail SMTP to send all emails through an external SMTP server for some detailed instructions on using SMTP via an external email provider.

There is a particular problem with using Yahoo email addresses as the From: email address – see Yahoo Issue.

When using SMTP you need to make sure any emails are from real a email address

With SMTP you typically need to authenticate – so you will need to make sure that any emails sent via the CF7 plugin are coming from a real email address.

This can be significant problem if you collect the From: email address in your CF7 form.

Using the default From: [your-name] <[your-email]> can cause problems

Using the default From: [your-name] <[your-email]> is very useful. It means you can simply hit reply to answer emails that you receive from people filling in your form.

But you need hosting that allows any email to be used as the From: email. Lots of quality hosting does that, but some hosts don’t (for various reasons), and this can definitely cause problems with sending emails.

For some hosts the From: email address needs to be a valid email on that domain. While we would never use hosting that imposes that restriction, it’s inevitable that some people will have hosts that do.

In that case you may need to can avoid using a customer input Email address as the From address and use something like From: noreply@yourdomain.com.

Then you can include the collected email address as a mailto: link in the body of the email as follows:

include-mailto-link

There is a further problem when users use a Yahoo email address – see Yahoo Issue.

Quote from the CF7 Support Forum:

I was having the very same problem, but only recently. Turns out that the new Dreamhost spam policy was the problem. Since it’s technically “spoofing” the user’s address to send email, Dreamhost no longer allows it.

http://wiki.dreamhost.com/Sender_Domain_Policy_and_Spoofing

Adding Additional headers can help

For less restrictive hosts, another possible solution is to add two additional email headers — Sender and Reply-To – in the Additional headers: field in the Mail section of the CF7 interface, like so:

Sender: noreply@yourdomain.com
Reply-To: [your-name] <[your-email]>

mail-contact-form-7-email-headers

These headers will inform the receiving mail server that the email was sent by your website on behalf of the sender.

Your email may be treated as spam

Your email message may have been routed to a spam folder or even worse, simply discarded as malicious. Emails can be considered spam for a whole host of reasons and get rejected at many points in the email process in addition to your spam folder.

This is usually due to email headers (in particular the From email address used) or email content. Adding Additional headers can help in this regard.

See also Contact Form 7 not Sending Emails which explains in more detail the main reasons for failed Contact Form 7 email deliveries and offer some possible solutions.

There is a general problem with Yahoo email addresses – see Yahoo Issue.

There are also a couple of measures you can use to convince recipient’s mail servers that your message is legitimate and should be delivered as addressed. See WordPress Codex – http://codex.wordpress.org/FAQ_Troubleshooting#E-mailed_passwords_are_not_being_received

Use a CF7 Submission Storage Plugin

Many experienced WP users use a submission storage plugin like Contact Form DB or Contact Form 7 Storage to save all your CF7 form submits to the WP database. These plugins provide a robust record of all form submissions even when things go a little wrong.

Our experience is that the submission storage plugins are very robust and rarely fail to save a CF7 form submit. They appear to save a CF7 form submit even if the email is not sent due to a Javascript Conflict or unallowed From: email address.

Contact Form 7 Storage - never miss a single business lead

Plugin or Theme Conflicts

Plugin and theme conflicts are unfortunately a fact of life with WordPress. As one of the most popular plugins in the WordPress Repository, it’s reasonable to assume that CF7 is written so that it does not cause conflicts with other plugins and themes.

However there are many plugins and themes that are not so well written. Like many other popular plugins, CF7 is frequently reported as not working in the WordPress Forums when the real cause is conflict from another theme or plugin – see Plugin or Theme Conflicts for a detailed explanation of this issue.

JavaScript Conflict

Contact Form 7 is a good WordPress community member in regards to it’s use of JavaScript and plugs correctly into the WordPress architecture.

Spinning ArrowHowever there are many plugins and themes that are not so well written and a host of CF7 email problems can be due to a JavaScript conflict with either your current WordPress theme or one of the other plugins you are using.

A spinning arrow continuing to spin after submitting a CF7 form, is a common symptom of a JavaScript conflict.

See JavaScript Conflict Problems to look at this issue in more detail.

Contact the developer of the plugin or theme developer causing the conflict

If you identify a conflict with a particular plugin or theme, you could write to the plugin or theme developer and suggest they might have a possible conflict with CF7.

CF7 is one of the most popular plugins in the WordPress Repository, so it makes sense for developers to deal with any potential conflicts.

Also if a plugin or theme conflicts with CF7, it probably also conflicts with many other plugins. It’s generally a sign of a poorly coded theme or plugin and one that people should avoid using.

Contact Form 7 didn’t install or update correctly on your site

It is always possible that Contact Form 7 doesn’t install or update correctly on your site. It’s a general problem with WordPress due to the unreliability of internet connections. Delete the plugin folder at wp-content/plugins/contact-form-7/ and install the plugin again.

Yahoo Issue

There is a general problem with using Yahoo email addresses as the From: email address. See Yahoo Issue.

Bug in WordPress 3.6 – Qmail based Hosts only

There is a bug in the WordPress 3.6 release that causes Contact-7 forms to fail to be emailed – but it only affects those hosts using Qmail based email systems. See
Bug in WordPress 3.6 – Qmail based Hosts only.

Useful Links

http://www.callum-macdonald.com/code/wp-mail-smtp/
WordPress, Contact Forms, the new Anti Spam Policy and why it sucks
Fix Contact Form 7 not working with Dreamhost
When Plugins Collide: Best Practices For Dealing With WordPress Plugin Conflicts
Conflict Diagnosis Guide for WordPress plugins
Using Your Browser to Diagnose JavaScript Errors

Receiving

There are a host of issues that can delay or stop emails on the receiving end of a typical email. You will need to investigate this issue in detail for your particular local configuration.

Quote from the CF7 Support Forum – If anyone has ‘problems’ in not receiving emails, it’s most certainly not this plugin, they should check their settings and their junk folders.

Emails are delivered late

Most emails are delivered within a few minutes, but emails can sometimes be delayed while in transit due to problems on the sender’s mail server, heavy Internet traffic, or routing problems. On rare occasions, delays can last for several hours or more.

The sender’s address is blocked

The Blocked Addresses feature in some Mail systems allows you to create a list of addresses that you don’t want to receive mail from. Mail coming in from one of these senders will neither arrive nor bounce, but will simply be discarded. Check your blocked addresses list and make sure that email address you’re using is not blocked.

You’ve enabled mail forwarding

Is the email address you’re using set to be forwarded to another email address.

Have you set up filters?

You might have set up filters which caused the email to be sent to the Trash folder or to another folder within your Mail account.

Useful Links

Troubleshooting common issues with email
Email Server Test

Do you have something you think might help others on this issue

This page is still a Work in Progress. We add more information as we become aware of other issues and solutions via the CF7 support forum.

If you have something you think might help others on this issue, you can use the CF7 form below to contact us.

Please note that anything that looks like a request for support or help will be ignored.

Help others on this issue



  1. Input this code: captcha
    (This helps us confirm you are real person and not a bot trying to crack our website)

(Mandatory fields marked * )


Of course this form is made using Contact Form 7 – use Firebug or Chrome Dev Tools to see how we’ve built it.