WordPress Published: Updated: 6 min read

WordPress not sending emails? Fix SMTP, SPF, DKIM and DMARC properly

Contact form messages vanishing, order emails in spam? Why WordPress email fails and how to fix it with SMTP and proper DNS authentication.

Email deliverability checks for a WordPress site: SMTP connection, SPF, DKIM and DMARC records

A contact form that says “Thanks, we’ll be in touch” while the message silently disappears is one of the most expensive bugs a business website can have. You never see the leads you lost. WooCommerce stores have the same problem with order confirmations, password resets and new-order alerts. If your WordPress site isn’t sending emails, or they keep landing in spam, the cause is almost always the same, and so is the fix.

Why WordPress emails go missing

By default, WordPress sends email with the wp_mail() function, which hands messages to PHP’s mail() on your web server. That worked reasonably well years ago. Today it’s unreliable for three reasons:

  • The server isn’t an authorized sender for your domain. Your email says it’s from hello@yourdomain.com, but it comes from a shared hosting server that your domain’s DNS records don’t mention. Receiving servers treat that as suspicious.
  • Shared servers have poor reputations. Hundreds of sites send from the same IP address, and some of them send spam.
  • Mailbox providers are stricter. Since 2024, Gmail and Yahoo require senders to authenticate their mail, and bulk senders must also publish a DMARC policy. Unauthenticated email is increasingly rejected or filtered.

Some hosts also block or limit PHP mail entirely. Either way, the result is the same: the site thinks the email was sent, and nobody receives it.

Step 1: confirm the problem

Before changing anything, find out what’s actually happening:

  1. Submit your own contact form and place a test order, if you run a store.
  2. Check the inbox and the spam folder of the receiving address.
  3. Try a Gmail or Outlook address too, since different providers filter differently.
  4. Install an email logging plugin to see whether WordPress tried to send the message at all.

If the log shows the email was never sent, the problem is in the form or plugin settings. If it was sent but never arrived, it’s a deliverability problem, which is far more common.

Step 2: send through SMTP

The single most important fix is to stop using PHP mail and send through a proper email service over SMTP or an API. An SMTP plugin such as WP Mail SMTP, FluentSMTP or Post SMTP routes every wp_mail() call through an authenticated mail server instead.

You can use:

  • Your email provider, such as Google Workspace or Microsoft 365. Fine for low volumes like contact forms.
  • A transactional email service such as Brevo, Mailgun, Postmark, Amazon SES or SendGrid. Better for stores and sites that send many emails, with logs and bounce tracking.

Set the From address to an address on your own domain, such as noreply@yourdomain.com or orders@yourdomain.com. Avoid sending “from” a Gmail or Yahoo address: those providers’ own policies make it fail authentication.

Step 3: publish SPF, DKIM and DMARC

SMTP gets the message out. DNS authentication proves it’s genuinely from you. You need all three records on the domain that appears in the From address.

How SPF, DKIM and DMARC work together to authenticate WordPress email

SPF: who may send for your domain

SPF is a TXT record listing the services allowed to send email for your domain. A domain can only have one SPF record, so if you use Google Workspace and a transactional service, both go into the same record, for example:

v=spf1 include:_spf.google.com include:spf.your-email-service.com ~all

The exact include values come from each provider’s documentation. Two separate SPF records, or more than ten DNS lookups, cause SPF to fail.

DKIM: a signature that proves the message wasn’t changed

DKIM adds a cryptographic signature to each email. Your email service gives you a DNS record, usually a TXT or CNAME record with a “selector” name, and signs every message with the matching private key. Receivers check the signature against your DNS. Without DKIM, many messages pass SPF but still look weak.

DMARC: what to do when checks fail

DMARC ties SPF and DKIM to the From address and tells receivers what to do with mail that fails. Start with a monitoring policy and a reporting address:

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

Once reports show your legitimate email passing, you can move to p=quarantine and eventually p=reject to stop others from spoofing your domain.

Step 4: test deliverability

After DNS changes have propagated, test again:

  • Send a test email from your SMTP plugin’s settings page.
  • Send a message to a mail-testing tool such as mail-tester.com and read the report.
  • In Gmail, open the message and choose “Show original” to see whether SPF, DKIM and DMARC say PASS.
  • Repeat with a real form submission and a real WooCommerce order email.

WooCommerce-specific checks

Stores have a few extra things to check:

  • In WooCommerce → Settings → Emails, make sure the emails you need are enabled and the “From” name and address match your authenticated domain.
  • Check the new-order recipient address. It’s often still set to a developer’s or old employee’s email.
  • Watch for plugins that send their own emails outside wp_mail(), which bypass your SMTP setup.
  • If customers say they never got an order confirmation, check your email service’s logs for bounces before assuming the email wasn’t sent.

Other common culprits

If SMTP and DNS are set up and some emails still go missing, check these:

  • Contact form settings. Many form plugins have their own “From” and “Reply-To” fields. If the From field is set to the visitor’s email address, the message fails authentication, because your domain can’t send on behalf of someone’s Gmail. Use your own address as From and put the visitor’s address in Reply-To.
  • Two SMTP plugins at once. They can override each other or silently break sending. Keep one.
  • Expired API keys or app passwords. Google Workspace and Microsoft 365 periodically change how apps authenticate. When a password changes or a key expires, sending stops without any visible error on the site.
  • A blocklisted domain or IP. If your domain was ever used to send spam, receivers may still distrust it. Check blocklist status and your email service’s reputation reports.
  • Sending limits. Free tiers of email services cap daily volume. A busy store can hit the limit on a sale day.

Why I built a tool for this

Diagnosing email problems used to mean checking DNS by hand, sending test after test and reading raw headers. I got tired of doing that on every client site, so I built Jafri Email Inspector Pro, a WordPress plugin that checks SPF, DKIM, DMARC and SMTP from inside the dashboard, logs outgoing email, tests WooCommerce emails and explains what to fix in plain language. If email problems keep coming back on your sites, ask me about it.

Frequently asked questions

Why do my WordPress emails go to spam?

Usually because the domain isn’t authenticated: no SPF, no DKIM or no DMARC, or the email is sent from the web server instead of an authenticated SMTP service. Fix authentication first, then look at content.

Do I need SMTP if my host says email works?

If you rely on emails for leads or orders, yes. Hosting mail may work today and stop tomorrow, and you’ll have no logs to tell you why.

Can a broken site send the WordPress recovery email?

Only if email works. That’s another reason to fix it: when a plugin causes a WordPress critical error, the recovery mode email is often the quickest way back into your dashboard.

Want it fixed for you?

Email setup is one of the most common bug fixes and technical improvements I’m asked for, because it touches the website, the DNS and the email provider at once. Tell me what’s not arriving, and I’ll trace where it’s failing and set up SMTP and authentication properly.

Tanveer Jafri, freelance WordPress and WooCommerce developer

Tanveer JafriFreelance WordPress developer. I build WooCommerce functionality, custom plugins and Elementor Pro sites. About me

Discussion

Comments

Leave a comment

Your email address will not be published. Comments are moderated.


→ / Start a project

Stuck on a WordPress problem?

Describe what's broken and what you've tried.

Get help or email tan@tanveerjafri.com