WordPress Not Sending Emails: Find Where the Message Stops

A contact form submits and nobody receives the notification. A customer asks for a password reset and the message never arrives. An order completes and the store owner hears nothing. All three get reported in the same words, and WordPress not sending emails is the phrase people reach for, but the three can have completely separate causes. The fix for one of them does nothing for the other two.

The reason this takes people a whole afternoon is that almost every piece of advice about WordPress not sending emails starts in the same place: install a plugin, connect a mail service, send a test. That often works. When it does not work, you are left with no idea which part of the chain failed, because nothing in the admin screens tells you. This article goes the other way around. It shows you how to find out where the message actually stops before you change anything, using the hooks WordPress already gives you and the error the mail library already produces.

Versions matter here. Several of the behaviors below changed between releases, and advice written for one version is wrong for another. Everything stated is against WordPress 7.1.5, which was the current release on 28 November 2026, with the version that introduced each hook named next to it.

WordPress not sending emails is two problems, not one

Before anything else, separate the two things that get called the same name.

These look identical from inside the dashboard. They need opposite responses. The first is a configuration or connection problem on your own host. The second is an authentication problem in your DNS, and no amount of plugin reconfiguring will touch it. Every diagnostic step below exists to tell the two apart quickly, because a WordPress email not working at your own server and one discarded by the recipient look identical from the dashboard.

What happens when something calls wp_mail()

Every email WordPress sends, and almost every email a plugin sends, goes through one function. the wp_mail() function takes the recipient, subject, message, optional headers, attachments and embedded files, hands them to PHPMailer, and returns a boolean. The documentation is explicit about what that boolean means: a true return value does not automatically mean the user received the email successfully, only that the method used was able to process the request without errors.

That single sentence explains most of the confusion. A form plugin that says “message sent” is usually reporting that wp_mail() returned true. The message may still be sitting in a queue, or bouncing, or landing in a spam folder on the other side. Reports of WordPress not sending emails very often begin with a green confirmation message of exactly that kind.

The function lives in wp-includes/pluggable.php, and the whole file exists for one reason, stated in its own header: these functions can be replaced by plugins, and if plugins do not redefine them, the core versions are used instead. In the WordPress 7.1.5 source, the definition opens with a check for whether wp_mail already exists. That check is what makes every WordPress SMTP plugin possible, and it is also the cause of a failure described further down this page.

Without a plugin, PHPMailer falls back to PHP mail(), which hands the message to the local mail transfer agent on the server. A WordPress SMTP plugin replaces that step with an authenticated connection to a mail provider, either by redefining wp_mail or by attaching to the phpmailer_init action, which has fired after PHPMailer is initialized since WordPress 2.2.0.

Read the actual error instead of guessing

WordPress gives you no admin screen that reports a failed send. It does fire a hook with the exception attached, and reading that hook is the single most useful thing you can do when WordPress not sending emails turns into a guessing game.

The wp_mail_failed action fires after a PHPMailer exception is caught, and it has done so since WordPress 4.4.0. It passes a WP_Error object carrying the exception message plus the recipient, subject, message, headers, attachments and embeds. Drop the following into a file in wp-content/mu-plugins so that it loads before everything else, and it will write the real reason into your debug log.

add_action( 'wp_mail_failed', function ( $error ) {
    error_log( 'wp_mail_failed: ' . $error->get_error_message() );
    error_log( print_r( $error->get_error_data(), true ) );
} );

For that log to be written you also need WP_DEBUG and WP_DEBUG_LOG switched on in wp-config.php, which sends messages to wp-content/debug.log. The WordPress debugging documentation is clear that the debugging constants are meant for development and staging installs rather than production, so if you turn them on to catch a mail error, set WP_DEBUG_DISPLAY to false first and turn them off again as soon as you have your answer.

Two companion hooks are worth knowing. The wp_mail_succeeded action has fired after a successful send since WordPress 5.9.0, which lets you log every message that was handed off cleanly. The pre_wp_mail filter, added in WordPress 5.7.0, lets code short circuit wp_mail entirely by returning a non null value, and a plugin or a snippet using it is a cause of total mail silence that produces no error at all, because nothing was ever attempted.

If the exception message names a connection refused, a timeout or an authentication failure, the message never left the server. If no exception fires at all and the log stays empty, the message was handed off and the problem is on the receiving side. That is the fork in the road.

The From address WordPress invents, and why it fails authentication

When no From header is supplied, WordPress builds one. The core source sets the name to the literal string WordPress and the address to wordpress@ followed by the host taken from network_home_url(), with a leading www. stripped off. A comment in the same block notes that some hosts block outgoing mail from this address when the mailbox does not exist.

That address is almost never a real mailbox. It usually passes SPF anyway on a simple setup, because the sending server is the same server the domain authorizes. Once you route through a mail provider it stops matching, and that mismatch is what turns a working site into a silent one the day somebody installs a WordPress SMTP plugin without changing the sender. A sender nobody thought to change is an easy thing to miss when WordPress not sending emails appears on a site that worked fine last month.

The part that differs on multisite

The host is read from network_home_url(), not from the individual site. The source of that function returns home_url() when the install is not multisite, and only then falls back to the network record. On a single site install the default sender therefore matches the domain you are looking at. On a multisite network it does not: every site in the network, including sites on their own mapped domains, gets a default sender built from the network domain, because the function assembles the URL from the current network domain and path. A per site SPF record will not cover that sender, and a per site DKIM signature will not align with it.

Set the sender rather than relying on the default. The wp_mail_from filter has filtered the address since WordPress 2.2.0, and wp_mail_from_name has filtered the display name since 2.3.0. Point both at a mailbox that genuinely exists on the domain you are authenticating, and keep them consistent across every plugin that sends.

What Gmail and Outlook actually require, and where the thresholds differ

Advice on this subject tends to flatten into a single instruction: set up SPF, DKIM and DMARC. The published requirements are not flat, and the difference decides how much work a small site needs to do.

Google publishes two tiers in its email sender guidelines. Since 1 February 2024, every sender to Gmail accounts has to set up SPF or DKIM authentication, keep valid forward and reverse DNS records for the sending domain or IP, use a TLS connection, keep the spam rate reported in Postmaster Tools below 0.3 percent, and format messages according to RFC 5322. Senders of more than 5,000 messages per day to Gmail accounts have to set up SPF and DKIM, both of them, and publish a DMARC record as well, although the DMARC enforcement policy is allowed to be none.

Microsoft draws its line at the same volume but applies all three above it. The Outlook announcement for high volume senders states that domains sending more than 5,000 messages per day to outlook.com, hotmail.com and live.com addresses are required to pass SPF, DKIM and DMARC, that non compliant messages are routed to Junk first, and that they may eventually be rejected.

So a small business site sending order confirmations and form notifications is below both thresholds and needs SPF or DKIM for Gmail, with DMARC strongly advisable rather than mandatory. A newsletter going out to a large list is above both and needs the full set. Reading the strict tier as universal makes people give up on a change they did not have to make. It also sends people hunting for a WordPress SMTP setting when the fix is a DNS record, which is why WordPress not sending emails so often survives three rounds of plugin changes.

The three records are defined by RFC 7208 for Sender Policy Framework, RFC 6376 for DomainKeys Identified Mail Signatures and RFC 7489 for Domain-based Message Authentication, Reporting and Conformance. Your mail provider generates the values; the records are published in the DNS zone for the sending domain, not in WordPress.

Why only one mail plugin can be active at a time

Because wp_mail is a pluggable function, a plugin replaces it by defining its own copy before the core file loads. PHP will not allow the same function name to be declared twice. Two plugins that both take this approach produce a fatal error naming wp_mail, and the site goes down rather than merely losing its mail.

Plugins that attach to phpmailer_init instead of redefining the function do not clash in that way, but they do fight over the same PHPMailer instance, and the one that runs last wins. The symptom is a test message that succeeds from one plugin settings screen and fails from another, on the same site, in the same minute. A second WordPress SMTP plugin left behind by a previous developer is worth looking for on any site you did not build.

Keep exactly one mail plugin active. If you inherited a site and are not sure how many there are, the same isolation technique used to diagnose a WordPress plugin that has stopped working applies here: turn them off for your own session only, then bring them back one at a time and test after each.

Host level causes that get blamed on WordPress

A good share of WordPress email not working reports are not WordPress problems at all. The host, not the install, is where a WordPress email not working ticket that has survived every plugin change usually ends. Rule the three below out before you touch a plugin, because none of them can be fixed from inside the dashboard.

The php.ini settings that do nothing on your server

A frequent recommendation is to set SMTP and smtp_port in php.ini. Read the PHP mail configuration reference before you spend time on it. The SMTP directive, which defaults to localhost, and smtp_port, which defaults to 25, are both documented as used under Windows only. On a Linux or other Unix style host, neither directive has any effect at all. The one that matters there is sendmail_path, which defaults to /usr/sbin/sendmail -t -i and is settable only at system level.

The same reference documents a diagnostic that very few WordPress guides mention. mail.log takes a file path and logs every call to the mail() function, including the full path of the calling script, the line number, the To address and the headers. If your host lets you set it, you get a record of whether PHP was ever asked to send anything, which settles the first question on this page without touching WordPress at all. There is a caveat in the documentation: if the setting is made in a .user.ini or .htaccess file while open_basedir is in effect, the path has to be inside open_basedir or the setting is ignored and a warning is emitted.

Snippets written before WordPress 5.5 that quietly stopped working

If a site carries a hand written mail snippet that used to work, check when it was written. WordPress 5.5 moved the PHPMailer library into the wp-includes/PHPMailer directory and put the classes under the PHPMailer\PHPMailer namespace. wp-includes/class-phpmailer.php was replaced by wp-includes/PHPMailer/PHPMailer.php, wp-includes/class-smtp.php by wp-includes/PHPMailer/SMTP.php, and the exception class moved into its own file at wp-includes/PHPMailer/Exception.php. The old files remain for backward compatibility and load the new ones, but loading them triggers a deprecated file warning.

Code that type hints the old global PHPMailer class, or catches phpmailerException, or requires class-phpmailer.php directly, is working against a shape that has been gone for years. The current instance is also no longer a bare PHPMailer object: WP_PHPMailer, introduced in WordPress 6.8.0, extends it so error messages use the WordPress internationalization method.

Check the PHP version underneath as well. WordPress requirements recommend PHP 8.3 or greater, with a note that it still runs on PHP 7.4 and above in legacy environments, and both of those older versions have passed end of life. A mail snippet that depends on behavior removed in PHP 8 fails silently in exactly the way a mail problem looks.

When the broken mail is also what locks you out

Two core features assume mail works, and both become invisible when it does not. This is the part of WordPress not sending emails that turns an inconvenience into a locked door.

The recovery mode email service, added in WordPress 5.2.0, sends the administrator an email containing a recovery link when a fatal error occurs, and pauses the plugin or theme responsible. If mail is broken, that email never arrives, and a site that would have told you exactly which plugin broke it simply appears dead.

The administration email verification screen, introduced in WordPress 5.3, asks an administrator to confirm the site email address on a schedule. The interval is controlled by the admin_email_check_interval filter, documented with a default of 6 months, and returning a falsy value such as 0 or false disables the check. Clicking Remind me later postpones it by 3 days. When the address on file is a mailbox nobody reads, every notification the site sends to it is lost, including the recovery link above.

Password reset is the third. A user who cannot receive the reset message cannot get in, and the login screen gives the same confirmation either way. If an administrator account is affected, fix mail from the server side or through the database rather than through the dashboard you cannot reach.

Contact forms and WooCommerce behave slightly differently

A WordPress contact form not sending email is the version of this fault most people meet first. The chain underneath is the one described above, with one extra variable: the form plugin decides the To and From addresses itself. A common setup puts the visitor address in the From field so that replying is easy. That makes your server claim to be sending as gmail.com or an address on a domain you do not control, which fails authentication immediately under the Google and Microsoft requirements above. Put your own authenticated address in From, and the visitor address in Reply-To. A WordPress contact form not sending email while every other message from the site arrives is nearly always that one field.

WooCommerce sends its order and account emails through the same core function, so everything on this page applies to a store unchanged. Its own email troubleshooting documentation states that WooCommerce sends mail using wp_mail(), and that in many cases a message that is not sent is a problem with the core email function on the web host rather than with WooCommerce generating the email. Two store specific checks are still worth making. Each email type carries its own Enable this email notification box under WooCommerce, Settings, Emails, so a single missing notification while the rest arrive is usually a switched off email. The same documentation describes a transactional email log under WooCommerce, Status, Logs that records a status for each attempt, including Disabled when the email type is turned off and Skipped when a required condition such as a recipient was missing.

A diagnostic order that does not waste a day

Run these in sequence and stop at the first one that answers the question. The order matters, because WordPress not sending emails has a cheap test for the most likely cause and an expensive test for the least likely one.

  1. Add the wp_mail_failed logger shown above, with WP_DEBUG_LOG on, and trigger the failing action once.
  2. If an exception was logged, the message never left. Read it. Connection refused and timeout point at a blocked port; authentication failed points at credentials; a relay refusal points at the From address.
  3. If nothing was logged, add the wp_mail_succeeded logger and trigger it again. A success entry means the handoff worked and the problem is downstream.
  4. If neither hook fires, something is short circuiting pre_wp_mail or the code never called wp_mail at all. Check which plugin is meant to be sending.
  5. For a downstream failure, check the From address against the domain you authenticate, then check the SPF and DKIM records for that domain.
  6. Send to a mailbox on a different provider. Delivery to one and not another is a reputation or authentication result, not a WordPress result.
  7. Only then change plugins, and change one thing at a time.

Working in that order keeps you from reinstalling a WordPress SMTP plugin three times over a DNS record. Steps two and five are the cheap ones, and both hand you an answer in a few minutes rather than an afternoon. The rest exist for the cases those two do not settle.

Common questions

Why isn’t my WordPress contact form sending emails?

Three causes are worth checking before anything else. The form plugin is using the visitor address in the From field, so your server claims to send as a domain it cannot authenticate. On a WordPress contact form not sending email to one address while another works, that is almost always the reason. The notification email is switched off or points at a mailbox nobody reads. Or wp_mail is failing for the whole site and the form is simply the first place anyone noticed. Log the wp_mail_failed hook first, because it separates the third cause from the other two in one test.

Why is WooCommerce not sending emails?

WooCommerce sends through the same core wp_mail function as the rest of WordPress, and its own documentation points at the core email function on the web host as the usual cause when nothing is sent at all. Check the site wide case first by triggering any other notification. If other mail arrives and only one order email does not, open that email type in WooCommerce settings and check its Enable this email notification box, then read the transactional email log under WooCommerce, Status, Logs.

How to fix WordPress not sending email issues?

Find out where the message stops before changing anything, because WordPress not sending emails covers two faults with opposite fixes. Log the wp_mail_failed action, which has carried the PHPMailer exception since WordPress 4.4.0, and trigger the failing message once. An exception means the message never left your server, and the text of it names the cause. No exception means the handoff worked and the receiving provider discarded the message, which is an authentication problem in your DNS rather than anything inside WordPress.

Why am I not getting emails from WordPress?

If you receive nothing at all, including password resets, the likeliest causes are that the host blocks outbound mail, that no local mail transfer agent is installed, or that the default sender address is being rejected. Those three are where to look first when WordPress not sending emails affects every message on a new install. WordPress builds the default sender as wordpress@ plus the site host when no From header is supplied, and the core source notes that some hosts block mail from an address that does not exist as a real mailbox.

Why are my emails not sending when I press the send button?

A send button that reports success is usually reporting that wp_mail returned true, and the documentation states plainly that a true return value does not mean the recipient received anything. It means the request was processed without errors. Treat the confirmation as the start of the investigation rather than the end of it, and check the mail log or the wp_mail_failed hook for what happened after the handoff.

Why am I getting emails but cannot send?

Receiving and sending are separate systems. Incoming mail is handled by the MX records for your domain and the mailbox provider behind them. Outgoing mail from a site is handled by the web server, or by whichever provider a mail plugin connects to. A working inbox tells you the domain resolves and the mailbox exists. It tells you nothing about whether your server is allowed to send on that domain.

Why are my outgoing emails not sending?

Work through the chain in order. The code has to call the mail function, the mail library has to reach a mail server, that server has to accept the message, and the receiving provider has to accept it too. A WordPress SMTP connection only covers the middle of that chain. Each link fails differently. The wp_mail_failed hook covers the first two, a provider log covers the third, and a message that is accepted everywhere and still not read is usually sitting in a spam folder.

Why is my SMTP email not sending?

Check the port first, because hosts commonly block outbound port 25 to limit spam while allowing submission on port 587 or implicit TLS on port 465. After that, check that the username and the From address belong to the same authenticated mailbox, since many providers refuse to relay a message whose sender does not match the account. The exception text from wp_mail_failed names which of the two failed.

Where do I find my SMTP settings?

They come from whoever handles your outgoing mail, not from WordPress. A mailbox provider or a transactional mail service publishes the host name, the port, the encryption method and the credentials to use, usually in the account area or the developer documentation. WordPress stores no such settings of its own: core hands the message to PHPMailer, which falls back to PHP mail() unless a plugin supplies connection details.

How do I fix my outgoing mail server problem?

Separate the server from the site. Send a message from a different client using the same credentials and host. If that fails too, the problem is the mail account or the network path and no WordPress SMTP setting will help. If it succeeds, the fault is in how the site is configured, and the exception logged by wp_mail_failed will usually name it. Avoid running two mail plugins at once while testing.

Leave a comment

Your email address will not be published. Required fields are marked *