I've created a Contact Us page (my-site.com/contact-us/) using contact-form-7 which works fine on my local WordPress install. However, when I try the same form on the online version of the site, it simply hangs.

I checked the http headers using Fiddler and saw that the url being used by the ajax submit is /contact-us/#wpcf7-f1-p15-o1. The error shown by Fiddler is HTTP 400 "Bad Request". There's no server information, so I'm assuming the request doesn't even make it to the server.

Local setup: XAMPP on Windows XP

Online setup: IIS 6.0 on Windows 2003

WordPress version: 2.9.2

Browser: Opera 10.61

Update: I'm using gmail as my smtp server via the WP-Mail-SMTP plugin.

  • Check around line 341 in wp-content/plugins/contact-form-7/includes/js/scripts.js. contentType: false should read contentType: 'application/json'. This is how I fixed it – Dieter Gribnitz Oct 18 '17 at 6:52

I've had this problem before. There's an easy way and a hard way to fix it.

The easy solution: use a Linux server.

The hard solution: write your own contact form.

IIS 6 doesn't play nice with anything WordPress uses or does. It works on XAMPP because that's a LAMP stack running PHP, MySQL, Apache, and (usually, for Windows) Tomcat. When IIS runs those scripts, it's all going through Windows. Think of your site as fuel, and Windows and Linux as different kinds of engines (diesel and regular. You can decide which you think is which). What works for one doesn't necessarily work for the other.

  • I'll accept your answer as it comes closest to a possible solution, though the client already dismissed the problem since the Contact Form is working on Firefox, Safari and IE – KalenGi Oct 8 '10 at 15:14

You can try checking if there is a working mail server that can process you mail. You can try asking your hosting provider regarding that.

  • I've updated the question with mail-handling info. I'm using gmail for smtp – KalenGi Sep 8 '10 at 2:10

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