This tutorial will show how to fix “Failed to send your message” error using Contact Form 7 plugin.
Contact form of the template is usually set up with the ‘Contact Form 7’ plugin. You have it installed under the Plugins> All plugins section and you can edit it via Dashboard> Contacts, configure functionality of the specific contact form, set up email address and so on.
But sometimes it happens that form doesn’t function as expected. Mails are not sent or received. Let’s clarify the possible issues:
The first case is when you get ‘Your message was sent successfully’ response message with green border, but never receive the email:
The green border message means that the PHP function for sending the mail has been completed successfully. So, if you can’t receive the mail, check the log of your mail server, it could give you some clues. Often this kind of issue is caused by spam filter.
The other matter is when you get ‘Failed to send your message. Please try later or contact administrator by other way.’ error message wrapped in an orange border:
Most likely the form submission is under suspicion of spam. If you use Contact form 7.3.0 or its earlier edition, the reason of the issue is Akismet (the spam filtering plugin). Check if you have it disabled.
On the Contact Form 7 3.1 or later editions the error message with the orange border occurs for multiple reasons. The most common one is cache. Now, verification has been implemented for the updated editions of the Contact Form 7 plugin. Once the cache file remains for longer than 24 hrs, now, verification will fail and an error with orange border will appear. To solve this issue, you should clear cache frequently (less than 24hrs). Check the settings of the cache plugin you use as well.
The other matter is when you get an error message with red border ‘Failed to send your message. Please try later or contact administrator by other way’:
In this case it is more likely you have problems with the mail server settings, therefore server admin is the one to be contacted to resolve it.
In this part we will explain how to configure your form properly in order to avoid this error message after the form submission.
First of all, let’s find which Contact form sends error: navigate to Pages – Contact us/Contacts in WordPress dashboard and look for the contact form shortcode with Ctrl/Cmd+F hotkeys, i.e. look for the contact text:
Next, navigate to the Contact tab of WordPress Dashboard, find and edit Contact form with the corresponding shortcode:
Navigate to Mail – Message body and check if it’s empty. In most cases the field will be empty. Next, switch to the Form tab and copy one of the fields tags used in Contact form:
Insert the copied tags into the Mail – Message Body field of Contact form. Make sure to wrap tag with square brackets:
It’s often happens that Contact Form plugin has been updated, your Message Body includes all the tags required but a new version of Contact Form 7 plugin may require new tags.
In order to find out a new tag, navigate to the Mail tab of Contact form and click one of fields types in Editor: you will see popup window with new tag:
Create a new field in the Contact form with a new tag and copy it into the Mail – Message body field. Update Contact form and test it at the front-end:
Feel free to check the detailed video tutorial below: