Skip to content
PLEN

Guide · WordPress and email

WordPress contact form not working: how to check whether my emails go to spam (SPF, DKIM, DMARC)

Usually the form works and the problem is in sending: WordPress hands the message to a server that does not deliver it or delivers it to spam. Below is the order of checks, from the simplest causes to domain configuration.

Published: · WordPress form and emails in spam

Kamil Kosiorek „Kosior”Author: — owner of Vis-Sol, author and process owner

How WordPress sends email

WordPress sends mail with the wp_mail() function, which uses the PHPMailer library. By default the message goes to the server's mail() function, so the hosting sends it “its own way”, without logging in to a mailbox. Form plugins such as Contact Form 7, WPForms or Gravity Forms usually rely on wp_mail().

The mail() function gives no information on whether a message arrived. Hosting may limit it, and receiving servers often treat such emails with suspicion because they are not signed on behalf of your domain.

Step 1: does the form send a message at all

Send a test submission with a unique subject and note the time. Check the target inbox, the spam folder and any forwarding rules. If the form plugin stores submissions in the database, check whether the test is there. If it is in the database but no email arrived, the problem is in sending, not in the form.

If clicking “Send” shows an error or a spinner that never stops, the cause may be a plugin conflict, a JavaScript error, page caching or an anti-spam check (reCAPTCHA) with an outdated key. The browser console and the PHP error log help here.

Step 2: the sender must be from your domain

A common mistake is putting the visitor's address in the “From” field, e.g. client@gmail.com. Your server has no right to send on behalf of gmail.com, so the message fails verification and lands in spam or is rejected. Contact Form 7 warns about this configuration.

Correct setup: “From” is an address on your domain, e.g. form@yourdomain.com, and the customer's address goes into “Reply-To”. That way the “Reply” button still goes to the customer.

Step 3: send through SMTP instead of mail()

The most reliable solution is sending through SMTP: WordPress logs in to a real mailbox or a sending service and sends the message like an email client. Plugins such as WP Mail SMTP, FluentSMTP or Post SMTP do this.

  • Create a separate mailbox or sending-service account just for form email.
  • Enter the SMTP server, port and encryption according to your mail provider's instructions.
  • Set the sender to an address on the same domain as the mailbox.
  • Send a test from the plugin panel and enable the sending log if the plugin offers one.

Why emails go to spam: SPF, DKIM and DMARC

Mail servers check whether a sender is allowed to send on behalf of a domain. Three DNS records serve this purpose. Since 2024 Gmail and Yahoo require them from senders of large volumes, and missing authentication lowers trust even for individual emails.

  • SPF: a TXT record listing servers allowed to send, e.g. v=spf1 include:… ~all. A domain may have only one SPF record, and nested DNS lookups are limited to 10.
  • DKIM: a cryptographic signature on the message. You publish the public key in DNS under selector._domainkey, while the sending server holds the private key. It is enabled at your mail provider.
  • DMARC: a TXT record at _dmarc tells receivers what to do with emails that fail SPF or DKIM (p=none, quarantine, reject) and where to send reports. Start with p=none and reports, and tighten it once all legitimate mail sources pass.

Remember that several services may send from your domain: the company mailbox, the website form, the invoicing program, the newsletter system. Each must be covered by SPF and have DKIM, otherwise part of your mail will be rejected once DMARC is enforced.

How to check whether my emails go to spam

Send a message from the form to a Gmail inbox and open it with “Show original”. You will see the SPF, DKIM and DMARC results (PASS or FAIL) and the server that actually sent the email. It is the quickest way to confirm that the configuration works.

  • Test services such as mail-tester score the message and show missing records and content problems.
  • Google Postmaster Tools shows domain reputation when you send larger volumes to Gmail.
  • Check whether the server IP or the domain appears on public blocklists.
  • Test with several providers: Gmail, Outlook, the company mailbox. Each filters slightly differently.

When bots flood the form with spam

The opposite problem is hundreds of fake submissions. A honeypot field that people cannot see but bots fill in, reCAPTCHA or a similar check, and a limit on submissions per address all help. Avoid sending automatic confirmations to the address entered in an unprotected form, because bots use this to send spam from your domain.

When to call in help

If messages still disappear after setting up SMTP and DNS records, the cause may be hosting configuration, a plugin conflict or domain reputation. Then it is worth going through the whole chain with someone who has access to server logs and DNS. General form diagnostics are also covered in our separate guide on a form that does not send messages.

Questions about WordPress forms and email deliverability

Why does Contact Form 7 say “sent” but the email never arrives?

The message only means WordPress passed the email on. If the server sends via mail() without authentication or the sender is outside your domain, the message may be rejected or filtered to spam along the way.

Is an SPF record alone enough?

SPF is the minimum, but without DKIM and DMARC messages are less trustworthy, and large mailbox providers increasingly expect all three. It is best to configure the full set.

I have two SPF records. Is that a problem?

Yes. A domain may have only one SPF record; two cause a verification error. Merge them into one that lists all sending services.

Which SMTP port should I use?

Usually 587 with STARTTLS or 465 with SSL/TLS, according to your mail provider's instructions. Port 25 is often blocked by hosting companies.

Do DNS changes work immediately?

Not always. New records propagate according to the TTL setting, from a few minutes to several hours. Test after a while and check the message headers.

See also: Website repair and modernisation · Websites Toruń · Free website audit

← All guides

Is your form silent while customers say they wrote?

We check the chain from the form to your domain's DNS and set up SMTP, SPF, DKIM and DMARC. Remotely for companies across Poland, on site in the Kuyavian-Pomeranian region.