75 guides published Start a blog Fix my site How we test
FIX IT

WordPress Is Not Sending Email

WordPress sends mail through PHP’s mail function by default. That produces an unauthenticated message from a server that is not the domain’s legitimate sender, and modern mail providers either reject it or file it as spam. The site reports success either way.

The short version

  • Check spam folders before assuming nothing was sent.
  • PHP mail is the problem on nearly every host.
  • SMTP through a real sending service is the fix.
  • SPF and DKIM records are what make it stick.

First: sent, or not sent?

Install a mail-logging plugin and trigger a password reset. The log tells you which problem you have:

Log saysMeaning
Sent, nothing arrivesDelivery problem — authentication, SPF, reputation
FailedServer-side problem — mail function disabled or blocked
Nothing loggedWordPress never attempted it — a plugin or hook issue

The fix: SMTP

Install an SMTP plugin and connect it to a transactional sending service. Use a dedicated service rather than a personal mailbox — consumer providers rate-limit and will eventually suspend an account used this way.

What you need from whichever service you pick:

  • SMTP host, port and credentials, or an API key.
  • A verified sending domain.
  • The DNS records they give you, added to your domain.

The DNS records that matter

RecordWhat it doesRequired?
SPFLists which servers may send as your domainYes
DKIMCryptographically signs your mailYes
DMARCTells receivers what to do with failuresStrongly recommended
Return-PathWhere bounces goUsually set by the service

Watch out

You may have only one SPF record. If you already have one, merge the new include into it rather than adding a second. Two SPF records is an error and causes failures that are hard to diagnose.

Set the From address correctly

The From address must be at a domain you control and have authenticated. Sending as a Gmail or Yahoo address from your server fails DMARC and will be rejected:

// wrong
From: [email protected]

// right
From: [email protected]

If mail still does not arrive

  1. Confirm the SMTP credentials are correct by using the plugin’s test function.
  2. Check whether the host blocks outbound port 587 or 465. Many do. Use the service’s API transport instead of SMTP if so.
  3. Verify SPF and DKIM have propagated using a mail-testing service.
  4. Check the sending service’s own dashboard — it will show accepted, bounced and blocked.
  5. Look for a plugin overriding the From address after you set it.

Testing properly

Send a test to an address at a different provider from your own, and check the raw headers for the SPF and DKIM results. Both should pass. A message that arrives but fails either will eventually be filtered.

Contact form mail specifically

Form plugins often send with the submitter’s address in the From field, which fails authentication immediately. Set From to your own domain and put the submitter’s address in Reply-To instead.

Common questions

Can I use Gmail SMTP?

For very low volume, yes. It rate-limits and is not intended for transactional mail from a website.

Why did it work before?

Mail providers tightened authentication requirements over time. Unauthenticated mail that was tolerated a few years ago is now rejected.

Do I need DMARC?

Not strictly, but without it a receiver has no instruction about what to do when a message fails, and will often decide against you.

S

Sumit

Writes everything on TechMozz.

More in Fix It