Contact Form 7′s “Failed to send your message” error


UPDATE: March 2, 2011

If you are using custom permalinks and your WordPress site is hosted in a Windows server running IIS 7 or later (Internet Information Services, Microsoft’s Web server), you need a file called Web.config. Keep on reading for details.

UPDATE: August 27, 2009

If your website is being hosted on GoDaddy and you are using WordPress version 2.8.x (2.8.4 being the latest at time of writing) and the latest version of Contact Form 7 (2.0.1 at time of writing), you are probably visiting this blog because you are getting the annoying “failed to send your message” error (with the red border) in your contact form.

I just found out this evening that after upgrading to Contact Form 7 2.0.1 and WordPress 2.8.4, my contact form won’t send e-mails anymore. When I wrote this post back in April 2009, I was using WP version 2.7.1.

This post will help you to finally fix this problem. If you haven’t done so, please install the WP-Mail-SMTP plugin and then read my original article on the issue.


This post is a follow-up article to my post titled “How to Send Email with WordPress from GoDaddy”.

Several visitors to my site have informed me that after trying out my suggestions in the aforementioned post, they are still receiving the following error message:

Failed to send your message. Please try again later or contact administrator by other way.

Failed to send your message. Please try again later or contact administrator by other way.

If you have applied the suggestions found in the “How to Send Email with WordPress from GoDaddy” post and still receive the error message above, please try the following:

  1. Go to Contact Form 7’s settings (Tools -> Contact Form 7 (version 1.x)) or the new “Contact” menu (Contact Form 7 version 2.x)
  2. Make sure that you enter “[your-email]” (without the quotes) in the “From:” field.
    From: field:  Enter the same e-mail address shown in the “From:” line of your WP-Mail-SMTP settings. For example, let’s pretend I am using “example@example.com” in the “From:” line of my WP-Mail-SMTP settings. I must enter the same e-mail address in Contact Form 7′s counterpart. Contact Form 7 will have [your-name] “<[your-email]>”. This won’t work for you.
  3. Very Important: Contact Form 7 will have a field called “Additional headers:”. Enter (literally) “Reply-To: [your-email]“, without the quotes. The [your-email] placeholder is the same field used inthe Contact Form 7′s form. Contact Form 7 will replace it with the e-mail the user supplies in the form. This header will allow you to reply to the sender directly without copying their e-mail address manually by you.
  4. Click the Save button.
  5. Open the Contact Form in your blog and you should finally see the sweet “Your message was sent successfully. Thanks.” green bordered text.

You will notice that the e-mail will take several minutes to arrive in your inbox. Take heart, it will arrive.

The “To:” field is the e-mail address where you would like to receive the results. The value I am using is my personal e-mail account. Also, make sure that you do include the person’s e-mail address in the form’s results so that you are able to have a copy of the person’s e-mail in hand.

I am going to share with you the code I’m using for my website’s contact form. Use it as a starting point. Note that it uses the Really Simple CAPTCHA plug-in for Contact Form 7.

“Form” Section

<p>Your Name:<span class="required">*</span><br />
    [text* your-name] </p>

<p>Your Email:<span class="required">*</span><br />
    [email* your-email] </p>

<p>Subject<br />
    [text your-subject] </p>

<p>Your Message<span class="required">*</span><br />
    [textarea* your-message] </p>

<p>
   [captchac captcha-897 size:m fg:#000000 bg:#ffffcc]
   Type in the Above Code<br />
   [captchar captcha-897]
</p>

<p> </p>
<p>[submit "Send"]</p>

“Mail” Section

  • To: field: The e-mail address that will receive the results. This can be any valid e-mail address, such as your GMail or Hotmail e-mail address. For example, “example@example.com”, without the quotes.
  • From: field: Enter the same e-mail shown in the “From:” line of the WP-Mail-SMTP settings [your-email]“, without the quotes. This field has been discussed above.
  • Subject: field: Enter “[your-subject]“, without the quotes.
  • Additional headers: literally type in “Reply-To: [your-email]“, without the quotes. Very important because this will allow you to reply to the person directly!
  • In the Message Body field, copy and paste the following code:
Name: [your-name]
E-mail: [your-email]

Message:
[your-message]

When you are done, click the Save button. You should end up with a form similar to mine, located here.

Custom Permalinks

If you are using custom permalinks, make sure that you uploaded the Web.config file requested by WordPress. WordPress should have asked you to create that file when you created custom permalinks. This only applies to Windows-hosted websites. The Web.config file should be located at the root of your website and contain the following code:

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

contact form 7, email, WordPress

  1. #1 by Van on April 3, 2010 - 9:54 PM

    When email host and wordpress host is on GoDaddy, I seem to have this problem. my website, aucklandmma.co.nz, is hosted on Godaddy windows server. When the From email on Contact Form 7 and WP-Mail SMTP was set to something on @aucklandmma.co.nz, I got the error. But when I changed the From email to my person hotmail account it worked. Any explanation for this?

  2. #2 by nathan on April 12, 2010 - 12:30 PM

    Thank you so much for your help!

  3. #3 by piggy on April 18, 2010 - 10:38 PM

    very good, i sovled the problem now! thanks very much!!

  4. #4 by Tom on April 21, 2010 - 5:28 PM

    I have followed your details and I still get the red text with wp mail smtp plugin. The test email works fine. And I can email myself on my own domain (but not an email on another domain). This tells me that the contact form 7 plugin *may* be loading before the wp mail smtp plugin. Is there any way to test for this?

  5. #5 by Max on April 28, 2010 - 12:12 AM

    Mario… thanks for posting all this. I have gone through about three years of torture using DotNetNuke :( aggghhh)

    So my first few days of trying out WordPress have been a breath of fresh air… until i hit all these issues with hosting WP on M$ Windoze server. Mainly SMTP issues and URL Rewite hassles.

    The “fix” came after installing WP-Mail-SMTP and following your guide, ensuring that i had all the right email addresses and settings in the right place. BTW i used SMTP Host: “localhost” for Win 2003 server

    Thanks again !

  6. #6 by Preschool Education on April 28, 2010 - 3:24 PM

    Any other good fill in form plugins you know of that I could use instead?

  7. #7 by allineoneexterior on May 12, 2010 - 10:22 AM

    Thanks so much for this helpful information! Up and running on godaddy, thanks to this and the other post. The wording of number 2 is a little confusing, could it be cleaned up a bit? THANKS FOR EVERYTHING!

    # 2 Make sure that you enter “[your-email]” (without the quotes) in the “From:” field.
    From: field: Enter the same e-mail address shown in the “From:” line of your WP-Mail-SMTP settings. For example, let’s pretend I am using “example@example.com” in the “From:” line of my WP-Mail-SMTP settings. I must enter the same e-mail address in Contact Form 7’s counterpart. Contact Form 7 will have [your-name] “”. This won’t work for you.

  8. #8 by F2 on May 28, 2010 - 3:39 PM

    Hey, that’s very well written post (original and follow up). Although I don’t code myself, I can understand the logic of the tweeks. However they are not working for me.

    Is there any difference when using Linux hosting (first post heading says Windows)? Should I ask for assistance GoDaddy or Google? :S

  9. #9 by Kassandra on May 29, 2010 - 9:50 PM

    Thank you for your specific solution points,I followed your first suggestion that installed WP-Mail-SMTP plugin,and I did the mail test,it works well.However when I submit my infomation via Contact form,it dosent work stating Failed to send mail,please contact admin through another method which makes quite annoyed.
    Bad work! I try another plugin–Cimy Swift SMTP,it’s indeed a useful plugin, meaning it works quite well.I can use my Contact Form now.
    also, my host is not Windows.

  10. #10 by Rich on June 3, 2010 - 12:09 AM

    Thank you, this was very helpful finishing up a site for a client.

    On a side note, I can’t believe the UX nightmare that is GoDaddy’s administration site. 12 different windows to accomplish one thing and every third step is a prompt to monetize by purchasing another add-on.

1 ... 6 7 8 9 10 ... 13

Comments are closed.