HomeGuides › Email that doesn’t arrive

WordPress contact form emails going to spam: read the headers

Form notifications go to spam when the receiving server can't confirm that your website was allowed to send for the domain in the From address. The receiving server writes its verdict — SPF, DKIM and DMARC — into the headers of every message. Read those, and you know which of the three failed instead of guessing.

What the three checks mean

  • SPF — the domain's DNS lists the servers allowed to send for it. It is checked against the envelope sender (the bounce address), which a shared host often sets to its own domain.
  • DKIM — a signature added by the sending server. If it's made with a key published in your domain's DNS, it proves the message came from you.
  • DMARC — passes only when SPF or DKIM passed for the same domain as From. This is the one that decides: a message can pass SPF for the host's domain and still fail DMARC for yours.

Check a notification email’s headers

This tool runs in your browser with JavaScript on; nothing you paste leaves the page.

How to get the headers

In Gmail, open the message, use the three-dot menu and choose Show original, then copy everything. In Outlook on the web, choose ViewView message source. The checker above reads it in your browser; nothing is uploaded.

The fixes, from quickest to most thorough

  1. Put an address on your own domain in From, and the visitor in Reply-To. This alone fixes most contact forms.
  2. Send through an SMTP plugin connected to your real mailbox or a transactional service, so the message is DKIM-signed for your domain.
  3. Publish SPF, DKIM and DMARC records for the domain, and include whatever service actually sends.

What Mailbag does about it

Mailbag Contact Form sends notifications From an address on your site's domain and sets Reply-To to the visitor's email in every new form. Its settings screen checks the From address against the site's domain and says so when they don't match — before your visitors' messages start disappearing. And because each entry is saved first, a notification that does land in spam is never the only copy.

Mailbag Contact Form is a free contact form that saves every entry before it sends anything, and shows you what happened to each email.

See what it does