Check that WordPress can send emails

Most “WordPress is not sending email” reports collapse to one of three diagnostic states: wp_mail() fails outright, the call succeeds but the message never leaves the server, or it leaves the server and lands in spam. Each state has a different cause and a different fix, and the only way to identify which one is in play is to test each layer of the send pipeline in order. Knowing what every test rules out matters more than running any single test.

This guide is the diagnostic side of the WordPress email problem. If the site has not been configured to send mail through an external service yet, the prior step is How to set up email on WordPress.

What “sending” actually means

A WordPress site sends mail through four distinct layers, each of which can succeed independently of the next:

  1. wp_mail(), the pluggable function in WordPress core (wp-includes/pluggable.php). Most plugins call this. A handful call PHP’s mail() directly and bypass it.
  2. PHPMailer, the library WordPress core bundles and instantiates inside wp_mail. By default wp_mail configures PHPMailer to use PHP’s mail() function, which hands the message to a local MTA (sendmail, Postfix, Exim). A mailer plugin replaces this default by hooking the pluggable wp_mail or reconfiguring PHPMailer to speak SMTP or an HTTPS API directly.
  3. The MTA or relay, which queues the message and tries to deliver it to the recipient’s mail server.
  4. The receiving server, which decides whether to accept, reject, or quarantine the message based on authentication (SPF, DKIM, DMARC) and reputation.

A send can succeed at layer 1 and fail at layer 2. It can succeed all the way through layer 3 and still land in spam at layer 4, for example after it fails DMARC. “The test email arrived” is not the same as “the site can send email,” and “the test email did not arrive” is not the same as “WordPress is broken.”

The diagnostic procedure is to test each layer in turn and read the result correctly.

Versions tested

The procedures below were verified against WordPress 7.1 with PHP 8.3, the Check & Log Email plugin at version 2.0.16, and WP-CLI 2.12 on a Debian-family host running Postfix. The Check & Log Email test screen and log status were re-read in the 2.0.19 source in November 2026. wp_mail has been in core since WordPress 1.2.1 and wp_mail_failed since 4.4; the complementary wp_mail_succeeded hook was added in 5.9 and is referenced below.

Test 1: Confirm the WordPress mail function works

The first test is whether wp_mail() returns successfully. The cleanest free tool for this is the Check & Log Email plugin, which installs an admin screen with a send-test form and a log of every message wp_mail has processed since activation. Install 2.0.18 or later; earlier versions have published cross-site scripting flaws.

Install and activate. The plugin adds a “Check & Log Email” item to the admin menu. Open its “Test Email” screen, enter a recipient address you can read, and click “Send test email”. The subject and body are fixed. The screen then says “The test email has been sent by WordPress” whatever happened: it does not read the result of wp_mail(). The result is in the log. Open “Email Logs” and look at the “Sent Status” column of the new entry: a tick if it is still marked sent, a cross if it was marked failed, with the error message shown when you hover over the cross.

The main Check & Log Email screen

The plugin writes each entry as sent before WordPress tries to send, and marks it failed only if the wp_mail_failed action fires. So a tick proves less than it seems: no failure was reported. In the usual case that means wp_mail() returned true, PHPMailer accepted the message and the underlying transport (PHP mail() or SMTP) did not raise an immediate error. A message that another plugin blocked before the send also keeps its tick, because blocking it fires no failure action. Even a real handoff does not prove the message will reach the inbox, will not be filtered, or will pass authentication at the recipient end.

A cross proves the opposite end of the same point: wp_mail could not hand the message off at all. The wp_mail_failed action hook fired, with a WP_Error carrying the underlying message; Check & Log Email stores that message with the entry, and mailer plugins typically surface it in their logs. The complementary hook is wp_mail_succeeded, added in WordPress 5.9, which fires when wp_mail returns true and is the canonical place to observe successful handoff from outside the calling plugin.

The Check & Log Email plugin is the test tool of choice because the log view doubles as a record of every other wp_mail call on the site (form submissions, password resets, WooCommerce notifications), which is useful when the problem turns out to be a single plugin and not the install. The same role is played by WP Mail Logging and Email Log, and most SMTP mailer plugins include a test-send feature and a log (free in FluentSMTP and Post SMTP, Pro-only in WP Mail SMTP).

Test 2: Confirm without a plugin, via WP-CLI

When the admin UI is unreachable, when no plugin is installed, or when the test needs to run across many sites, WP-CLI is the cleaner option. From a shell on the server:

wp eval 'echo wp_mail("[email protected]","wp-cli test","body") ? "sent\n" : "FAILED\n";'

wp_mail returns a boolean. A sent result means wp_mail() returned true and the transport raised no immediate error. FAILED means wp_mail returned false, and again wp_mail_failed will have fired with details a logging plugin or a custom debug snippet can capture.

This is the test to use when the question is “does this install send email at all,” with no assumptions about which plugins are present. It is also the test to script when checking a fleet.

Test 3: Read the server log

A passing test at layers 1 and 2 says the message left WordPress. The next question is whether it left the server.

On a host with PHP’s mail logging enabled, php.ini carries a mail.log directive (the PHP manual covers the setting) and every call to mail() writes a line recording the script that issued it and the recipient. The MTA log lives in different places depending on the distribution: on Debian and Ubuntu, Postfix writes to /var/log/mail.log; on RHEL-family systems with systemd, the same content is reachable via journalctl -u postfix. Exim writes to /var/log/exim4/mainlog; sendmail to /var/log/maillog. The log line records whether the message was queued, what relay it was handed to, and whether the relay accepted it.

When wp_mail succeeds but the MTA log shows no corresponding outbound message, the host is dropping the call silently. This is the signature of a sandboxed mail() function on shared hosting, or a mail() override that returns true without doing anything.

When the MTA accepts the message but the next hop refuses it, the log will say so. It may name a blocked source IP, an SPF failure or a DMARC failure.

When a mailer plugin is in use, its own send log is the equivalent record and is usually easier to read than the system log. FluentSMTP and Post SMTP keep one in their free versions; WP Mail SMTP keeps it in Pro.

Reading the three outcomes

The three results worth distinguishing:

Failure at the WordPress layer. wp_mail() returns false. The error is captured by wp_mail_failed and surfaced in a logging plugin. The cause is almost always a missing or broken transport: no MTA on the host, blocked outbound port 25, or an SMTP plugin configured with bad credentials. The fix is to install a mailer plugin (FluentSMTP and WP Mail SMTP are the two safe defaults) and route mail through a transactional sending service.

Success at the WordPress layer, no inbox arrival. Tests pass; the recipient inbox stays empty, including the spam folder. The message was handed to the local transport and lost between there and the receiving server. Either the local transport dropped it (test 3 confirms this), the receiving server rejected it (the bounce, if there is one, appears in the MTA log), or it was accepted and silently filtered. The next step is a deliverability test from outside WordPress: send to a service like mail-tester.com and inspect the SPF, DKIM, and DMARC results, then check the sending IP against the major blocklists.

Success and inbox arrival, but in spam. A separate problem, and the most common one once the basic plumbing works. The mail is being sent, accepted, and routed to junk because of authentication failure or sender-reputation issues. The fix lives in DNS, not in WordPress: SPF, DKIM, and DMARC records configured correctly for the sending domain, plus alignment between the address WordPress uses in the From: header and the domain those records cover.

Things that look like a send problem but are not

A few cases that produce reports of “WordPress is not sending email” while actually testing fine:

  • Plugins that bypass wp_mail. A handful of older contact-form and WooCommerce plugins call PHP’s mail() directly. Their notifications fail even when every WordPress-level test passes, because the test never touches their code path. The fix is to use a plugin that respects wp_mail, or to file a bug with the vendor.
  • From-address misalignment. A site sends as [email protected] from a host whose mail has neither an SPF pass nor a DKIM signature that aligns with yourdomain.com. If the domain publishes a DMARC record, the message fails DMARC. Each receiver then applies its own policy, so one receiver can accept a message that another marks as spam or rejects. wp_mail() can still return true. A mail-tester run shows the SPF, DKIM and DMARC results.
  • Queueing layers. WooCommerce dispatches transactional mail through Action Scheduler, and some marketing and CRM plugins use Action Scheduler or their own cron-driven queues to defer sends. A “missing” test email is sometimes a queued one: the wp_mail call has not happened yet because the scheduled task has not run. Check Tools -> Scheduled Actions (WooCommerce) or the plugin’s queue view before assuming a failure.

What to install

For a UI-driven test of wp_mail: Check & Log Email. It is free, supported, and the log doubles as an audit trail for every other email the site sends.

For a test that runs on a schedule: nanoPost Email Check, a plugin nanoPost makes. It sends a test email twice daily, daily or weekly and shows a dashboard warning when one fails. It records whether wp_mail() returned success and, on failure, any error text captured from wp_mail_failed. That does not show whether the message arrived, so check the inbox too.

For routing mail through a relay when the host cannot send directly: a mailer plugin (FluentSMTP, WP Mail SMTP, Post SMTP, SMTP Mailer) connected to a transactional sending service. The mailer plugin replaces wp_mail with one that goes through an SMTP server or an HTTPS API, side-stepping the local MTA entirely.

For deliverability problems that survive a successful send: SPF, DKIM, and DMARC, configured at the DNS layer for the sending domain.

Use Check & Log Email as a logger. Its SMTP tab can make it the site’s mailer, but on a server that cannot send, a mailer plugin with a transactional service is the fix. What the log does is tell you the server cannot send. That is half the diagnosis.

Tests in order, layer by layer. The answer falls out.

Corrections
  • 2026-11-26: an earlier version said Check & Log Email’s test screen takes a subject and reports whether the send succeeded or failed, and called the plugin not a mailer. The screen has no subject field and always says the email has been sent; the result is in the log, where an entry is marked failed only if WordPress reports a failure. The plugin can also act as the site’s mailer. The page also did not say to run 2.0.18 or later.
  • 2026-11-26: an earlier version said a host missing from the domain’s SPF record gets mail silently dropped by some receivers, and gave a missing DKIM signature on its own as a reason for spam placement or refusal. DMARC fails only when neither SPF nor DKIM aligns, and each receiver decides what to do with the message.
  • 2026-11-25: an earlier version said, without a source, that many shared hosts disable mail() entirely.
  • 2026-11-05: an earlier version said WP Mail SMTP’s free plugin keeps a send log. The log is a Pro feature.