The release of Contact Form 7 – version 4.4 introduced the Configuration Validator which validates Contact Form 7 form configurations to detect errors leading to mail delivery failure or other troubles.
This article explains:
- the expected input for each Mail setting field
- common mistakes
- how you can resolve Contact Form 7 form configuration validation errors.
The Contact Form 7 Configuration Validator is designed to warn Contact Form 7 users of problems in their particular form setup that can cause their form emails to not be sent or be rejected as spam.
Tl:dr (too long; didn’t read) version
- This field has syntax errors
- This email address does not belong to the same domain as the site
- This field can be empty depending on user input
- Selectable Recipient with Pipes Error
- Disable Contact Form 7 Configuration Validator
Validator Error Messages
We’ve created a collection of simple solutions to each Validator Error Message displayed by the Configuration Validator.
1. This field has syntax errors
Problem
It’s important to realize that when a form gets submitted you are sending a regular email but you are doing it from WordPress via PHP on your web server.
The To: From: Subject: and Additional Headers: fields in the Mail section of the Contact Form 7 interface are all normal email fields.
Just like normal emails your form email needs a valid value for each of these fields.
If you don’t supply a valid To: From: and Subject: field for your form email, then your email is likely to be rejected or not arrive at it’s intended destination – just as you would expect if you didn’t supply suitable values when sending a normal email.
A Simple Solution
FORM section
<p>Your Name (required)<br /> [text* your-name] </p> <p>Your Email (required)<br /> [email* your-email] </p> <p>Subject <br /> [text your-subject] </p> <p>Your Message<br /> [textarea your-message] </p> <p>[submit "Send"]</p>
MAIL section
To: [your-name] <[your-email]> (uses correct email syntax to send an email to the form user) From: valid-email-address@your-domain.com (needs be a valid email address) Subject: Site Name - [your-subject] (adds extra info to ensure you still have a valid Subject when user does not supply a value)
2. This email address does not belong to the same domain as the site
Problem
Using an email address in the From: field that does not belong to the same domain as the site where your form is hosted is becoming increasingly risky.
You need hosting that allows any email to be used as the From: email. Many hosts don’t allow this to try to prevent spam being sent for their servers.
Even if your host allows this, your emails are now more & more likely to be seen as spam by other hosts.
If your site was on example.com, then the email being sent should be sent from abc@example.com as well.
If you’re sending with the From on a different domain, then that email will fail to send properly on some hosting systems, or be rejected as spam by a lot of mail receiving systems.
Using From:Â [your-name] <[your-email]> is now risky
When you use the users submitted email address in the From: field you are trying to send an email from that address – e.g formuser@customer.com.
But your form is hosted at yourdomain.com.
So what your host and other email hosts see is an email from formuser@customer.com sent from yourdomain.com.
.. and that mismatch in domain names looks like spam.
But if use something like noreply@yourdomain.com in the From: field then you don’t look like a spammer and all is good in the world again.
Another Simple Solution
FORM section
<p>Your Name (required)<br /> [text* your-name] </p> <p>Your Email (required)<br /> [email* your-email] </p> <p>Subject (required)<br /> [text* your-subject] </p> <p>Your Message<br /> [textarea your-message] </p> <p>[submit "Send"]</p>
MAIL section
To: any-valid-email-address@any-valid-domain.com (use any valid email address on any valid domain) From: valid-email-address@your-domain.com (use a valid email address on the domain where your form is hosted) Subject: [your-subject] (making Subject required in your form ensures you don't have an empty Subject field in your form email) Additional Headers: Reply-to: [your-name] <[your-email]> (allows you to use Reply in your email application to reply to the form users email address)
3. This field can be empty depending on user input
Problem
Just like normal emails your form email needs a valid To: From: and Subject: field.
If you use a Mail TagMail Tag Mail Tags are used in Contact Form 7 (CF7) (in the Mail Tab) to show information collected from CF7 form fields (in the Form Tab) in emails sent by CF7. in any of these fields you can experience problems if the user does not supply a value.
Then you could be trying to send an email with an empty required email field and it’s likely that Contact Form 7 won’t be able to send the email.
If you don’t deal with the issue your form users would likely to see “Failed to send your message. Please try later or contact the administrator by another method.” message if they don’t fill in the Subject field .
​
​That is likely to confuse many people submitting your form. ​If you haven’t made the field required in your from they won’t get any advice on what they have done wrong.
This is one of the advantages of the Contact Form 7 Configuration Validator – it warns of possible issues that your form users may already be experiencing but you don’t yet know about.
One more Simple Solution
FORM section
<p>Your Name<br /> [text your-name] </p> <p>Your Email (required)<br /> [email* your-email] </p> <p>Subject (required)<br /> [text* your-subject] </p> <p>Your Message<br /> [textarea your-message] </p> <p>[submit "Send"]</p>
MAIL section
To: [your-name] <[your-email]> ([your email] is a required field to ensure you don't have an empty To: address) From: [your-name] <valid-email-address@your-domain.com> (adding [your-name] allows you to sort by the name of the sender & apply filters in your email application) Subject: [your-subject] (making Subject required in your form ensures you don't have an empty Subject field in your form email)
The Contact Form 7 Configuration Validator is designed to warn Contact Form 7 users of problems in their particular form setup that can cause their form emails to not be sent or not arrive at their destination.
4. Selectable Recipient with Pipes Error
Problem
Using Selectable Recipient with Pipes is a good way to send form emails to different email addresses while avoiding displaying these email addresses on the Internet. This technique puts hidden email addresses in a Contact Form 7 drop-down list.
But if a user does not select a value from the list then you will be trying to send an email without a To: email address.
The form user will see a “Failed to send your etc.” message and won’t know what they have done wrong.
The solution is to simply make the select field containing the hidden email addresses required by adding a asterisk – [select* … ].
Our Simple Solution
FORM section
[select* your-recipient "CEO|ceo@example.com" "Sales|sales@example.com" "Support|support@example.com"]
MAIL section
To: [your-recipient] (making the select field required ensures you have a value in the To: field)
5. Disable Contact Form 7 Configuration Validator
If you are comfortable that you have dealt with any warnings offered by the Contact Form 7 Configuration Validator you can disable future warnings using the methods given below:
Using wp-config.php
define( 'WPCF7_VALIDATE_CONFIGURATION', false ); Add to your wp-config.php
Using functions.php
add_filter( 'wpcf7_validate_configuration', '__return_false' ); Add to your theme's functions.php
Responding to external changes that have impacted heavily on the use of forms on websites
This addition to Contact Form 7 was added in response to changes that have occurred over the past couple of years that have impacted heavily on the use of forms on websites.
Most significantly changes made by a number of prominent hosts (including Gmail & Yahoo) to help control email spam – see Yahoo DMARC Issue.
At the same time, many other hosts have been implementing their own email restrictions, in response to these significant spam reduction measures – see Contact Form 7 Email Issues.
The plugin author, Takayuki Miyoshi, noticed an increasing number of Contact Form 7 users had problems sending or receiving their form email from Contact Form 7.
In particular he observed a lot of users had issues in their contact form configuration that were causing serious troubles, including mail delivery failure.
The Contact Form 7 Configuration Validator is designed to warn Contact Form 7 users of problems in their particular form setup that can cause their form emails to not be sent or not arrive at their destination.
Since its introduction its proven to be very effective at getting millions of CF7 users to adjust their CF7 forms & prevent, before they happen, email sending problems on their forms.
Contact Form 7 Troubleshooter
If you would like some help from our support staff & are willing to help us by providing information on your use of Contact Form 7 & CF7 Skins, you should complete the following form:
This form is made with CF7 Skins + CF7 Skins Pro + CF7 Skins Ready + CF7 Skins Multi + CF7 Skins Logic
Prefer to learn via video?
This video briefly demonstrates how to setup the mail settings within Contact Form 7.
Still have questions?
If you still have questions on the Contact Form 7 Configuration Validator, after reading and working through the information provided in this article, you should ask your question in the CF7 support forum.
Please include:
- a link to your Contact Form 7 form plus
- all your input in the Form and Mail sections of the CF7 interface.
This helps others to understand your actual problem and offer a possible solution.
Make sure you create a separate post for your question as per the WordPress Forum Guidelines.
Please do NOT add your question to an existing question. While some may people feel adding “I’m having the same problem” is helpful in the WordPress support forums, it makes it significantly harder for forum volunteers to focus on & help solve your particular problem.
Forum volunteers answering questions in the WordPress support forums each day, really appreciate when you add your question in a separate post.
This page is still a Work in Progress
This article was created from questions asked in the CF7 support forum related to this issue. We add more information as we become aware of other issues and solutions.
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 probably be ignored.
Of course this form is made using CF7 Skins