It's one of the most common calls we get. "Our contact form has stopped working." Nine times out of ten, the form is working perfectly well, and the emails are being sent. What's going wrong is that they're quietly landing in a spam folder, or being turned away at the door, without anyone noticing.
If your website brings in enquiries, that's a problem worth fixing immediately, because every missed message is a customer who thinks you never replied.
Why it happens
The usual culprit is how the email is sent. A lot of websites send form submissions in a way that pretends the email has come from the visitor, so if John Doe fills in your form, the email arrives looking as though it was sent by johndoe@gmail.com.
The trouble is that your web server isn't Gmail, and Gmail knows it. To the receiving mail system, an email claiming to be from Gmail but sent by a server somewhere else looks exactly like what a spammer would do. So it gets treated with suspicion.
Even when the email claims to be from your own domain, it can still fail if your domain hasn't been set up to say which servers are allowed to send on its behalf.
The three records that matter
This is where three slightly alarming acronyms come in - but they're simpler than they sound.
SPF (Sender Policy Framework) is a list, published in your domain's settings, of the servers allowed to send email for your domain, much like a guest list on the door of a nightclub - if the sending server isn't on it, the bouncer gets suspicious.
DKIM (DomainKeys Identified Mail) adds a digital signature to every email. The receiving server checks the signature against a key published in your domain's settings. If it matches, it knows the email really came from you and wasn't tampered with on the way.
DMARC ties the two together. It tells receiving servers what to do if an email claiming to be from your domain fails those checks: let it through, put it in spam, or reject it outright. It also lets you receive reports on who's sending email using your name, which is often an eye-opener.
Why it's got worse recently
For years, plenty of email got through without any of this set up properly. That's changed - over the last couple of years, the big email providers, including Google, Yahoo and Microsoft, have tightened their rules considerably, so email that isn't properly authenticated is far more likely to be filtered or rejected than it used to be.
Which is why a contact form that has worked fine for years can suddenly start losing messages, even though nobody has touched the website.
How to fix it
The fix usually has three parts.
First, the website should send email from your own domain, such as website@yourcompany.co.uk, and put the visitor's address in the reply-to field. You can still just press reply, and the email is no longer pretending to be something it isn't.
Second, rather than sending email directly from the web server, it's best to send through a proper email delivery service. We use Amazon SES for our hosted sites, but there are several good options. These services are built for deliverability and have the reputation the big providers trust.
Third, set up SPF, DKIM and DMARC records for your domain so that everything lines up. Once that's done, it's worth sending a test through a free checker such as mail-tester.com, which scores your email and tells you exactly what's wrong.
One extra tip: make sure your website also saves a copy of each submission somewhere, not just in an email. That way, even if an email does go astray, the enquiry isn't lost.
If you're not entirely sure that every contact request from your website is making it through to you, get in touch with us and we'll be happy to have a look around and figure things out.