1. Home
  2. Notes

Why contact form emails end up in spam

Your contact form works, but the emails still never arrive. Contact form emails end up in spam, or nowhere, more often than most site owners realise, because nobody notices: the form says thanks, the message lands in spam, and the visitor thinks you ignored them. Here's why it happens and what helps.

Published
17-11-2026
Updated
17-11-2026
Reading time
3 min
Topic
Under the hood

Why it happens

Many websites send form emails themselves, straight from the web server, with nothing that proves it may send for your domain. Gmail, Outlook and company mail servers treat that as suspicious. Nothing in email is a guarantee, but without a few settings a contact form is easier to mark as spam.

Two routes to the inbox

with SPF, DKIM and DMARC the email is easier to trust, without them it is easier to mark as spam.

What a TXT record is

DNS holds your domain's settings. A TXT record is one line in it, and mail servers read it before they trust your email. Three of them matter here: SPF, DKIM and DMARC.

Record The question it answers
SPF Who may send email for this domain?
DKIM Is this email really from this domain, and unchanged?
DMARC What should happen when a check fails?

SPF: who may send for your domain

A list of the servers that may send email for your domain. If a server isn't on the list, receivers get suspicious. A domain has one SPF record, and a sending service is added to it. It looks like this:

v=spf1 include:mailgun.org ~all

DKIM: a signature on every email

A signature added to every email. The receiver checks it against a key in your DNS, so it knows the email really came from your domain and wasn't changed on the way. It looks like this something like this:

v=DKIM1; k=rsa; p=MIGfMA0GCSqG…

DMARC: what to do when a check fails

Your instructions for when SPF or DKIM don't line up with the sender's address: let the email through, send it to spam, or reject it. It also sends you reports. Most start with "none", which only sends reports:

v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.nl

How to check yours

  • Fill in your own form

    See where the message lands.

  • Send a test to Gmail and Outlook

    Use an address at each, since they filter differently.

  • Ask about the records

    If it ends up in spam or doesn't arrive, ask whoever manages your DNS to check the three records above.

What I set up on every site

On every website I build, the emails go out through Mailgun, from a subdomain like mg.yourdomain.nl, with the SPF, DKIM and DMARC records set up. It's how every site is built, not an extra.

Questions

No. Nothing in email is a guarantee. Without them a contact form is easier to mark as spam.

The strict rules from 2024 and 2025 are for senders of 5,000 or more emails a day to Gmail or Outlook, which is hard to reach as a smaller website. The same filters still judge small senders' emails.

Mailgun recommends sending from a subdomain, verified with an SPF and a DKIM record, so your main domain's email isn't mixed up with the website's.

Picture of Gijs van der Borg, Gijs at Gijsworks

Questions about your contact form?

Get in touch and I'll point you to what to check first.

Get in touch

Start a project

  • Reply within 2 business days
  • 30 days of fixes included after launch