Contact Form 7 & Office 365

I’ve been dabbling a bit with WordPress recently, and really you can’t go past ContactForm7 for ease of use for newbies and allowing some fairly advanced-ish customisation for those that are a few levels above newbie.

What I did discover recently though was that if your emails are hosted on Office 365, and your website is hosted on some server somewhere, then Office 365 will flag the emails as fraud.

This makes sense, ContactForm7 requires you to set the “From” email to be the same as the domain, because if you had your emails on the same server (like back in the good ole days hehe) then the server would see the email incoming from the website and all would be hunky-dory.

The easiest way to fix this error is to set the from email as the same server. In my case, I sent a test email to myself and looked at the headers to find the server address, then set my from email to be “website@<servername>”

Remember to keep the Reply-All email to the email address the website visitor enters! Otherwise your admin staff will get very confused when replying to emails originating from the website.

One slight hitch is that ContactForm7 does some simple validation on the form. You need to disable that for this fix to work. Go to their FAQ on validation to see how to do this.