← Guides

Diagnosis guide

Contact Form Not Sending Emails: Diagnosis Guide

If your contact form stopped delivering emails, or they now land in spam, the cause is almost never the form plugin itself — it is how the mail leaves your server. The most common culprit is that the site sends via the default PHP mail() function with no authenticated SMTP, so mailboxes like Gmail and Outlook silently reject or junk it. Start by installing an SMTP plugin (or configuring authenticated SMTP), send a test through it, and check whether SPF, DKIM and DMARC are correctly published for your sending domain.

The symptom

Visitors submit the contact form and you never receive the email — or you receive some, but they consistently arrive in the spam/junk folder. Often the form shows a success message on screen ("Thank you, your message has been sent") while nothing reaches the inbox, which is the tell-tale sign the problem is delivery, not the form. Sometimes it worked for months and stopped after a host migration, a plugin update, or a change of email provider. In WordPress with Contact Form 7 you may instead see the red banner: "There was an error trying to send your message. Please try again later."

What it usually means

In the majority of cases the site is handing mail to the server's local sendmail/PHP mail() function without authentication, and receiving providers no longer trust that. Since early 2024 Gmail and Yahoo enforce authentication for senders, so an email claiming to be from you@yourdomain.com but sent from an unrelated server IP fails SPF/DKIM and is rejected or junked. The other frequent cause is a mismatch in the "From" address — the form sends as the visitor's address or a no-reply that your domain does not authorise — which triggers DMARC alignment failures. Less often, the mailbox that should receive the message has a full quota, a forwarding rule, or an over-aggressive spam filter.

What we check first

We start by reproducing a real submission and capturing what actually happens, in order. First, enable an email log — WP Mail SMTP, Fluent SMTP or the debug log — and confirm whether the message is even being handed off, or failing at PHP level (look in the server mail log, typically /var/log/mail.log or the host's Mail panel, for lines like "550 5.7.1 SPF check failed" or "550-5.7.26 Unauthenticated email"). Next we send a test to https://www.mail-tester.com and read the score and the exact SPF/DKIM/DMARC verdicts. Then we verify the DNS records directly with dig TXT yourdomain.com and dig TXT default._domainkey.yourdomain.com, checking the SPF line (for example v=spf1 include:_spf.google.com ~all) actually includes the server or provider that sends your form mail. Finally we inspect the raw headers of a received test for the Authentication-Results line — it states pass/fail for spf, dkim and dmarc and points straight at the broken link.

What you can safely check yourself

Send yourself a test through the form and check the spam folder as well as the inbox — if it is in spam, the form works and the issue is deliverability. Confirm the recipient address in the form settings is spelled correctly and the mailbox is not full. Run your domain through mail-tester.com or MXToolbox's deliverability check and note whether SPF and DKIM say "pass". If you use WordPress, look under the form plugin's mail tab to see which "From" address it uses — it should be an address at your own domain, not the visitor's.

What NOT to touch

Do not edit your DNS zone at random — deleting or duplicating an SPF record (you are only allowed one SPF TXT record per domain) can break all email from the domain, not just the form. Avoid setting the SPF policy to a hard fail (-all) or DMARC to p=reject until you have confirmed every legitimate sender is authenticated, or you will bounce your own mail. Do not paste SMTP passwords into a plugin config on a site you are unsure is secure, and never disable authentication "to make it work". Leave server-level Postfix or Exim configuration alone unless you know the host allows it — many shared hosts override it anyway.

What a 30-minute diagnosis can determine

In half an hour we can normally pinpoint the exact failing link: whether mail leaves the server at all, whether it fails SPF, DKIM or DMARC, and whether the "From" address is misaligned. We identify the correct fix path — configuring authenticated SMTP (your mailbox provider, or a transactional service such as a dedicated SMTP relay), correcting the single SPF record, and publishing or repairing the DKIM key. You leave the diagnosis knowing the specific record to change or plugin to configure, with the exact values, rather than guessing. In many cases the fix itself also fits inside the session.

When it becomes a bigger job

It grows beyond a quick fix when the domain has a tangled DNS history — multiple conflicting SPF records, legacy DKIM keys, or a DMARC policy already set to reject that is bouncing real mail. Migrating the site to authenticated transactional sending, warming up a new sending domain, or untangling email across several services (marketing, invoicing, support and the form all sending as the same domain) is a project, not a patch. If the form mail is entangled with a wider deliverability reputation problem — the domain is on a blocklist, or a previous compromise sent spam — that needs a proper remediation plan.

Quick checklist

  • Send a live test submission and check spam as well as the inbox
  • Enable the form's email log (e.g. WP Mail SMTP) and read the last error
  • Run the domain through mail-tester.com and note the SPF/DKIM/DMARC verdicts
  • Confirm there is exactly one SPF TXT record and it includes your real sender
  • Check dig TXT default._domainkey.yourdomain.com returns a valid DKIM key
  • Verify the form's "From" address is at your own domain, not the visitor's
  • Read the Authentication-Results header of a received test email
  • Confirm the recipient mailbox is correct, not full, and has no odd filters

Frequently asked questions

Why does my WordPress contact form say it sent but I get nothing?

The form handed the message to PHP mail() and the server accepted it locally, but the receiving provider rejected or junked it for failing authentication. Configure authenticated SMTP and check SPF/DKIM.

Why do my contact form emails go to spam?

Usually because SPF, DKIM or DMARC do not pass for the address the form sends from. Send a test to mail-tester.com to see which one fails, then fix that DNS record or use authenticated SMTP.

Do I need an SMTP plugin for Contact Form 7 or WPForms?

In practice, yes. The default PHP mail() route fails modern deliverability rules, so an SMTP plugin (WP Mail SMTP, Fluent SMTP) that authenticates against your mailbox or a relay is the reliable fix.

What SPF record should a contact form use?

Only one SPF TXT record per domain, and it must include whatever actually sends the mail, e.g. v=spf1 include:_spf.google.com ~all. Do not create a second SPF record — merge the includes into one.

Why did my form stop working after changing host?

The new server's IP is not authorised by your SPF, or the old host's SMTP settings no longer apply. Point the form at authenticated SMTP and update SPF to include the new sender.

How do I check if SPF and DKIM pass?

Send a test to mail-tester.com, or open a received email's headers and read the Authentication-Results line — it shows pass or fail for spf, dkim and dmarc.

If your form is still swallowing messages or dropping them into spam after these checks, a short diagnosis usually finds the exact failing link fast. Our one-off technical support steps into your existing site and email setup, pinpoints whether it is SMTP, SPF, DKIM or DMARC, and gives you the precise values to fix — billed in 30-minute increments, with a reply within two business hours.

Besoin d'une intervention ciblée ?

Décrivez le blocage — devis sans engagement, ou rappel sous 2 h ouvrées. Supplément urgence possible (+29.98€).