Website forms and email deliverability: SPF, DKIM and DMARC

If enquiries from your website land in spam or vanish, the cause is usually email authentication. Here is what SPF, DKIM and DMARC do and how to fix it.

Illustration of a sealed envelope passing through three large coloured gates, each with a tiny guard.
In this article
  1. Why does WordPress email go to spam?
  2. How does an SMTP plugin help?
  3. What are SPF, DKIM and DMARC, in plain words?
  4. What did Gmail and Yahoo change in 2024?
  5. How do you test that it works?
  6. How do you keep it working?
  7. The short version

In short

WordPress form emails go to spam because, by default, the web server sends them without proof that it is allowed to send for your domain. Send them through a proper mail service using an SMTP plugin, then publish SPF, DKIM and DMARC records so receiving servers can verify them. Since February 2024, Gmail and Yahoo require this authentication.

A business owner notices enquiries have gone quiet. The contact form looks fine and the “thank you” message appears. Weeks later someone finds a pile of leads in the spam folder, or worse, discovers they never arrived at all.

This is one of the most common problems we see on WordPress sites, and it is almost never the form plugin’s fault. It is about how the email is sent and whether the receiving server can trust it. Here is the plain-English version.

Why does WordPress email go to spam?

Out of the box, WordPress sends email from the web server itself, using PHP’s built-in mail function. The message says it is from your domain, say [email protected], but it was actually sent by a web server that has nothing to do with your email provider.

To Gmail or Outlook, that looks exactly like what spammers do: a message claiming to be from a domain, sent by a server that domain has not approved. So it gets filtered to spam, delayed or rejected outright.

Other common causes:

  • The “From” address is the visitor’s address. Some forms send the enquiry “from” whatever the visitor typed. You cannot authenticate someone else’s domain, so it fails.
  • The From domain does not match the site. For example, the site sends as [email protected].
  • Shared hosting IP reputation. Your site may share a sending IP with hundreds of others, some of them sending spam.
  • No SPF, DKIM or DMARC records, or records that do not include the service actually sending the mail.

How does an SMTP plugin help?

An SMTP plugin changes how WordPress sends email. Instead of the web server sending directly, WordPress hands each message to a proper email service, using a login or API key. That service is set up to send for your domain, so its messages can pass authentication.

You have two main options:

  1. Your existing email provider, such as Google Workspace or Microsoft 365. Fine for low volumes like contact forms, though these providers have sending limits and some require app passwords or OAuth.
  2. A transactional email service built for sending website and app email. These handle higher volumes, give you delivery logs and make DKIM setup straightforward. Most have a free or low-cost tier that covers a typical business site.

Many SMTP plugins also log every email WordPress sends. That log is invaluable: when someone says “I never got the confirmation”, you can see whether it was sent and whether the service accepted it.

Tip: Set the form’s “From” address to one on your own domain, such as [email protected], and put the visitor’s email in the “Reply-To” field. You can still hit reply and answer them directly.

What are SPF, DKIM and DMARC, in plain words?

These are three DNS records, small entries in your domain’s settings, that let receiving servers check whether an email really comes from you. Cloudflare’s guide to email DNS records sums them up well. Think of a letter arriving at a company’s post room.

RecordPost room comparisonWhat it does
SPFA list of approved couriersLists the servers and services allowed to send email for your domain
DKIMA tamper-proof sealAdds a cryptographic signature proving the message came from your domain and was not changed
DMARCThe post room’s instructionsTells receivers what to do if SPF or DKIM fail (deliver, quarantine or reject) and sends you reports

SPF

SPF is one TXT record that lists who may send for your domain. A common mistake is having two SPF records, for example one added for Google Workspace and another for a newsletter tool. You can only have one; combine them into a single record that includes every service.

DKIM

Your sending service gives you a DKIM record (or several) to add to DNS. After that, it signs every message. DKIM survives forwarding better than SPF, which is why it matters so much for deliverability.

DMARC

DMARC ties the other two to the address people actually see in the From line. That link is called alignment: the visible From domain must match the domain that passed SPF or DKIM. Start with a monitoring policy (p=none) and a reporting address, read the reports for a few weeks, then move to quarantine and eventually reject once every legitimate sender passes.

Watch out: Jumping straight to p=reject before every service is authenticated can block your own invoices, newsletters or form emails. Move up gradually.

An envelope halfway into a dark metal postbox slot, lit green, with a small brass key below.
Authentication works like a verified sender's key: receiving servers check it before deciding which folder a message belongs in.

What did Gmail and Yahoo change in 2024?

In February 2024, Google and Yahoo started enforcing new rules for anyone sending to their users. Google’s email sender guidelines require all senders to:

  • Set up SPF or DKIM for their sending domain.
  • Have valid forward and reverse DNS for sending servers.
  • Use TLS when sending.
  • Keep spam complaint rates below 0.3%.

Bulk senders, defined in Google’s sender guidelines FAQ as those sending close to 5,000 or more messages a day to personal Gmail accounts, must also use both SPF and DKIM, publish a DMARC policy with alignment and offer one-click unsubscribe on marketing email. Yahoo’s sender best practices set very similar requirements, including DMARC of at least p=none for bulk senders.

Google’s FAQ also says that from November 2025 it is ramping up enforcement, with non-compliant messages facing temporary and permanent rejections. A contact form will never be a bulk sender, but the baseline rules apply to everyone, and unauthenticated form email is exactly what those rules are designed to filter.

How do you test that it works?

Do not assume; test. After setting things up:

  1. Submit your own form to a Gmail address and an Outlook address.
  2. Open the message headers. In Gmail, use “Show original”, which shows SPF, DKIM and DMARC as PASS or FAIL.
  3. Check your SMTP plugin’s log to confirm the message was handed to the mail service.
  4. Use a mail testing tool that gives you an address to send to and scores the result.
  5. Test the visitor’s side too: does the auto-reply or order confirmation reach the customer?

How do you keep it working?

Email setups break quietly. A new marketing tool gets added without updating SPF, an API key expires, or someone moves the site to a new host and forgets the DNS records.

  • Read DMARC reports, or use a free or low-cost service that turns them into a readable summary. They show every service sending as your domain.
  • Set up Google Postmaster Tools if you send newsletters or larger volumes. It shows your spam rate, reputation and authentication results for mail to Gmail.
  • Send yourself a test form submission every month, or let monitoring do it.
  • Document every service that sends as your domain, so DNS changes include them.

If you are moving hosts, list all email records first; our guide to moving WordPress without downtime covers that step. If you would rather hand this to someone, it is the kind of setup we look after on our managed hosting.

The short version

  • WordPress’s default email looks unauthenticated, so it often lands in spam.
  • Use an SMTP plugin with a proper mail service, and send from your own domain with the visitor in Reply-To.
  • SPF lists approved senders, DKIM signs messages and DMARC tells receivers what to do when checks fail.
  • Since February 2024 Gmail and Yahoo require authentication from all senders, and more from bulk senders.
  • Test with real inboxes, read DMARC reports and recheck whenever you add a tool or change host.

Questions people ask

Why are my WordPress contact form emails going to spam?

Usually because WordPress sends them from the web server using PHP's mail function, and your domain's SPF, DKIM and DMARC records do not say that server is allowed to send for you. Receiving servers treat unauthenticated mail as suspicious. Routing mail through an authenticated SMTP or email API service fixes most cases.

Do I need DMARC if I only send a few emails a day?

Gmail and Yahoo only make DMARC mandatory for bulk senders, but it is still worth having. It protects your domain from being used in phishing, and a basic p=none policy costs nothing and gives you reports on who is sending as you.

What is the difference between SPF, DKIM and DMARC?

SPF lists which servers may send email for your domain. DKIM adds a signature that proves a message came from your domain and was not altered. DMARC tells receivers what to do when those checks fail and sends you reports.

Should the form email come from the visitor's address?

No. Sending as the visitor's address means you are sending as a domain you do not control, and it fails authentication. Send from an address on your own domain and put the visitor's address in the Reply-To field so you can reply directly.

Tell us whatyou need built.

Send the brief, or call us. We will tell you honestly whether we are the right studio for it, and who to call if we are not.

Entity Media
Skopje
North Macedonia
Working hours
Mon-Fri, 09:00-17:00
Reply time
Within one working day
Care plans
Cancel with 30 days' notice
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.