Blog

Tip: WordPress mail functionality with Contact Form 7 on Windows Server and IIS

February 15th, 2012

WordPress is such an awesome light weight CMS and blogging engine. We love it and we use it wherever we see such needs for maintaining small sites that needs social media integration.

Since we are primarily a Microsoft Shop, we host wordpress on our Windows Servers. One of the problems you might have seen doing this is  the mail functionality. We anyways use third party Email SMTP server, so we don’t want to muck with the PHP Mail functionality. And ofcourse, there is a plugin for rescuing us. Check out the plug in WP Mail SMTP  here. With in few seconds, you will be able to configure the SMTP and it works out of the box. We have tested it with GMAIL and Go Daddy Servers. Awesome right!!

But here is another catch. We were using another great plugin called Contact Form 7 (CF7) for a simple contact us form. You can read more about this here.  We like this plugin as it is like a simple template system to generate forms dynamically and emits a clean HTML tags that we can easily style as we please.  So after installing a simple contact us form using CF7 when I tested it, I get this error message “Failed to send your message, please try later…..”

Well I thought already solved my mail configruation problem using WS Mail SMTP. I mean it sent the test message. So what now? Well after researching, came to realize that if I installed CF7 before WS Mail SMTP, the CF7 plugin doesn’t know that we are now WS SMTP plugin to send our mail.

Fix: Uninstall the CF7 plugin ( make sure you backup all your form templates ). Make sure the WS SMTP plugin is active and you got the test email from the site. Now install the CF7 plug-in and test the contact form. Now when you submit the contact form with all the required fields, it should work. Simple!!

Hopefully this will help someone. Again we love wordpress, its plug-in architecture and its awesome community.

We at RIA Mobile Solutions design and develop business websites, member based websites and e-commerce search engine SEO friendly websites that tightly integrates with Social Media to give our customer competitive advantage while minimizing the effort needed to maintain the site. If you have such needs, please feel free to drop us a line and we will be happy to chat with you about your project.