Your contact form says “message sent”, but nothing ever arrives. A customer resets their password and the email never shows up. Your order confirmations vanish into the void. WordPress not sending emails is one of the most common WordPress problems there is — and the fix is usually a 30-minute job once you stop guessing and diagnose it properly.
This guide does exactly that. You will find out in about ten minutes whether WordPress is even attempting to send mail, read the real error instead of guessing, then fix the cause — usually by routing mail through an authenticated SMTP provider — and prove the fix works with real tests. Every step is verified against the official WordPress docs and current provider pricing, checked 24 November 2026.
Why WordPress emails go missing
Every email WordPress sends — password resets, comment notifications, form submissions, order confirmations — goes through one function, wp_mail(). By default, that function hands the message to PHP’s mail() function, which relies on whatever mail setup your server happens to have. That is the root of the problem, and it breaks in three different places:
- The email never leaves your server. Your host has no mail server configured, or it disabled PHP
mail()entirely. WordPress tries and fails silently. - The email leaves, but the recipient’s server rejects it. It arrives from
wordpress@yourdomain.com— an address that does not exist — with no SPF or DKIM authentication. Gmail and Yahoo have required SPF or DKIM from every sender since 1 February 2024. - The email leaves, but lands in spam. It was sent from a shared hosting IP with a poor reputation, or from a domain with no DMARC record. The recipient never checks spam, so as far as they are concerned, your site never sent anything.
Each cause has a different fix, which is why “install an SMTP plugin” is good advice only after you know which one you are dealing with. The diagnosis takes ten minutes.
Step 1: Find out whether WordPress is sending emails at all
Do not start with your contact form — it adds its own settings and failure modes to the problem. Test WordPress itself instead: log out, go to the login screen, and click “Lost your password?”. If the reset email arrives, WordPress mail works and the problem is in your form plugin or notification settings. If nothing arrives, check the spam folder, then run the definitive test.
If you have SSH access, WP-CLI answers the question in one command, run from your WordPress folder:
wp eval "var_dump( wp_mail( 'you@example.com', 'WordPress test email', 'If you can read this, wp_mail() works.' ) );"
Here is the catch, and the single most misunderstood fact about WordPress email: a true result does not mean the email was delivered. The official wp_mail() documentation says so plainly — a true return only means the sending method accepted the message without error. It says nothing about whether the recipient’s server accepted it, or whether it reached the inbox. So true plus no email in your inbox means the problem is downstream: authentication, reputation, or spam filtering. false means WordPress itself could not hand the message off, and the next step tells you why.
WordPress not sending emails? Read the real error first
When wp_mail() fails, WordPress fires an action called wp_mail_failed, passing a WP_Error object with the exact PHPMailer error message, plus the recipient, subject, and headers of the failed email. Most sites never see this error because nothing is listening for it. Add a listener. First, turn on the debug log — add these lines to wp-config.php, above the line that reads /* That's all, stop editing! Happy publishing. */:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Then add this snippet — in a code-snippets plugin, or your site-specific plugin — to write every mail failure into wp-content/debug.log:
add_action( 'wp_mail_failed', function ( $error ) {
error_log( 'wp_mail failed: ' . $error->get_error_message() );
error_log( 'wp_mail data: ' . print_r( $error->get_error_data(), true ) );
} );
Now trigger a test email again and open wp-content/debug.log. The most common errors:
- “Could not instantiate mail function.” PHP
mail()is disabled or there is no sendmail binary on the server. Nothing will ever send until you switch to SMTP — the most common error on cheap shared hosting and VPS setups. - “SMTP Error: Could not connect to SMTP host.” Your SMTP settings are wrong, the port is blocked by your host, or the provider’s server is unreachable. Check the host, port, and encryption — and ask your host whether outbound ports 587 and 465 are open.
- “SMTP Error: Could not authenticate.” The username or password is wrong. For Brevo, the password is the SMTP key, not your account password or API key. For Gmail, it is an app password, not your Google password.
- No error at all, but no email either. The message left WordPress fine and died downstream. That is an authentication or reputation problem, not a WordPress problem. Skip to the DNS section below.
Keep this logging snippet in place after the fix, too. Silent mail failure is how password resets and order confirmations go missing for weeks before anyone notices — and WordPress Recovery Mode emails, the ones that let you back into a broken site, depend on working delivery.
Step 2: The fix that solves most sites — authenticated SMTP
For most sites, the fix is to stop using PHP mail() and send through an authenticated SMTP account instead. An SMTP plugin reconfigures wp_mail() so every email WordPress sends goes through a real mail account or a transactional provider, with a login the receiving server can verify.
Install one SMTP plugin — never two, because they overwrite each other’s configuration — and pick from this comparison (install counts checked on WordPress.org, November 2026):
| Plugin | Active installs | Price | Email log included free? |
|---|---|---|---|
| WP Mail SMTP | 4 million+ | Free (Pro from $49/year) | No — Pro only |
| FluentSMTP | 700,000+ | Free | Yes |
| Easy WP SMTP | 500,000+ | Free (Pro available) | No — Pro only |
| Post SMTP | 300,000+ | Free (Pro available) | Yes |
| SMTP (WordPress.org) | 700+ | Free | Yes |
WP Mail SMTP is the default choice: the largest user base, a setup wizard, and 15 free mailers including Brevo, Mailgun, SendGrid, Postmark, and Gmail over OAuth. Its one real weakness is that the email log is a paid feature. If you want logs without paying, FluentSMTP is the better pick — completely free, with logs and failure alerts included. WordPress.org also relaunched a community plugin simply called SMTP in November 2026, with a free log, but at 700+ installs it is too new to recommend yet.
Whichever plugin you choose, setup follows the same five steps:
- Create a sender account. A mailbox on your own domain, or an account with a transactional provider from the table below. You need a host, a port, a username, and a password.
- Enter the SMTP settings. Use port 587 with TLS (STARTTLS) unless your provider says otherwise. Port 465 with SSL is the alternative. Port 25 is the old default and is blocked by many hosts — do not use it.
- Set the From address to an address on your own domain — for example
noreply@yourdomain.com— and tick “Force From Email” if your plugin offers it. By default WordPress sends fromwordpress@yourdomain.com, an address that does not exist. That alone is enough to get mail rejected. - Send the plugin’s test email to an address you can open, and confirm it lands in the inbox, not spam.
- Test a real email, not just the test button. Request a password reset and submit your contact form. The test button proves the connection works; only a real notification proves the whole chain works.
If the connection test times out, your host is probably blocking the port. Ask the host to open outbound 587 and 465, switch to a provider that offers port 2525 as a fallback (Brevo and Mailgun both do), or use an API-based mailer instead — WP Mail SMTP’s Brevo, Mailgun, SendGrid, Postmark, and Resend mailers send over HTTPS, so no SMTP port is involved.
Step 3: The no-plugin route — configure PHPMailer directly
If you would rather not add another plugin, WordPress lets you configure its mailer with about 30 lines of code. It does the same job as the plugins, without storing settings in the database — the right call on client sites, where you want the mail configuration in version control rather than in a settings screen someone can break.
Add the credentials to wp-config.php, above the “That’s all, stop editing!” line, so the password never sits in a theme file:
define( 'SMTP_HOST', 'smtp-relay.brevo.com' );
define( 'SMTP_PORT', 587 );
define( 'SMTP_SECURE', 'tls' );
define( 'SMTP_USER', 'your-smtp-login' );
define( 'SMTP_PASS', 'your-smtp-key' );
Then create a must-use plugin at wp-content/mu-plugins/site-smtp.php — create the folder if it does not exist; must-use plugins load automatically and cannot be deactivated from the dashboard:
<?php
/**
* Plugin Name: Site SMTP
* Description: Routes all WordPress mail through authenticated SMTP.
*/
add_action( 'phpmailer_init', function ( $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Host = SMTP_HOST;
$phpmailer->Port = SMTP_PORT;
$phpmailer->SMTPSecure = SMTP_SECURE; // 'tls' for port 587, 'ssl' for 465
$phpmailer->SMTPAuth = true;
$phpmailer->Username = SMTP_USER;
$phpmailer->Password = SMTP_PASS;
$phpmailer->From = 'noreply@example.com';
$phpmailer->FromName = 'Example Site';
} );
The phpmailer_init action fires after PHPMailer is initialised and hands you the mailer object by reference, so every wp_mail() call on the site goes through your SMTP account. The host, port, and credentials in the example are Brevo’s; swap them for your own provider’s values. Test it with the password-reset flow, and keep the wp_mail_failed logger in place so failures still surface in debug.log.
Step 4: Pick a sender — free tiers that cover a WordPress site
An SMTP plugin is only half the fix; it needs a sending service behind it. For a typical WordPress site, a free tier is usually enough. These limits were checked against the providers’ own pricing pages in November 2026, but providers change them often, so confirm before you sign up:
| Provider | Free tier | SMTP host | Card required? |
|---|---|---|---|
| Brevo | 300 emails/day | smtp-relay.brevo.com | No |
| Mailgun | 100 emails/day | smtp.mailgun.org | Yes |
| Resend | 3,000 emails/month (100/day) | smtp.resend.com | No |
| Mailjet | 6,000 emails/month (200/day) | in-v3.mailjet.com | No |
Brevo’s 300 emails a day is the most generous free tier and the simplest pick: no card, SMTP included on the free plan. Resend is the developer favourite — clean API, no branding, 3 domains on the free plan — and its SMTP username is the literal string resend. Mailgun is the most powerful of the four, but its free tier is the smallest and it asks for a card. SendGrid’s free tier is 100 emails a day but only for a 60-day trial, so do not build on it long-term.
One warning: do not use a personal Gmail account as your site’s sender. It works for a handful of test emails, but a personal inbox is not a transactional mail service, and your site’s email breaks the day you change your Google password. Use a transactional provider, or a mailbox on your own domain.
Step 5: Authenticate your domain — SPF, DKIM, and DMARC
SMTP fixes sending. Authentication fixes delivery. Without it, your now-working SMTP connection still sends mail that Gmail and Yahoo distrust. Since February 2024, Gmail requires every sender to authenticate with SPF or DKIM, use TLS, and keep its spam rate below 0.3% in Google Postmaster Tools. Bulk senders (around 5,000 messages a day to Gmail) must pass SPF and DKIM, publish a DMARC record, and align the From domain with the authenticated domain.
Your provider gives you the exact DNS records to add — copy them from its domain setup screen:
- SPF — a TXT record naming the services allowed to send mail for you. It looks like
v=spf1 include:spf.brevo.com ~all, but theinclude:value differs for every provider, and some do not use SPF at all for shared sending. Use exactly what your provider shows you, and merge it into your existing SPF record if you have one — a domain must have only one. - DKIM — a public key published as a TXT record (usually at
mail._domainkey) that lets receiving servers verify your messages were really signed by you. Your provider generates the key pair; you publish the public half. - DMARC — a TXT record at
_dmarc.yourdomain.comtelling receiving servers what to do with mail that fails SPF and DKIM checks. Start with a monitoring policy that changes nothing but reports back:v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com. Move top=quarantineonly after a few weeks of clean reports.
After adding the records, wait for DNS to propagate — usually minutes, occasionally a few hours — then verify them with a free checker such as MXToolbox, and send a test email to a Gmail address. Open it, click “Show original”, and check that SPF, DKIM, and DMARC all say PASS. If any says FAIL, the record is wrong or has not propagated yet — do not move on until all three pass.
Step 6: Prove it works — the verification checklist
A green test button is not proof. Run this checklist and tick every box:
- Password reset: request one from the login screen and confirm it arrives in the inbox within a minute.
- Contact form: submit your own form and confirm the notification arrives, with the visitor’s address as reply-to.
- Order or comment email: trigger one real notification end to end.
- Check the log: confirm each test appears as sent in your plugin’s email log — or, on the code route, confirm no new
wp_mail_failedentries indebug.log. - Check authentication: open a test message in Gmail, click “Show original”, and confirm SPF, DKIM, and DMARC all pass.
- Check the spam folder: search it for your test messages. A fix that delivers to spam is not a fix.
Then set a monthly reminder to send yourself one test email. Email breaks silently, and the only way you find out is when a customer says they never got their order confirmation.
5 mistakes that keep WordPress email broken
1. Running two SMTP plugins at once. They overwrite each other’s settings. Pick one and delete the other.
2. Testing only the plugin’s test button. It proves the SMTP connection works. It does not prove your contact form, your store, or your membership plugin actually sends. Test the real flows, not just the button.
3. Sending from an address you do not own. The default wordpress@yourdomain.com sender, or a From address on a domain you have not authenticated, is the fastest route to the spam folder. The From domain must match the domain you authenticated.
4. Skipping DNS authentication. SMTP without SPF and DKIM is a car with no number plates — it moves, but nobody trusts it. Gmail has required authentication since February 2024.
5. Letting staging send real email. A staging copy has the same SMTP settings and the same customer database. The first time someone tests a checkout on staging, a real customer gets a real order email from a fake order. On staging, disable outgoing mail or route it to a single test inbox.
The short version
WordPress not sending emails is almost never a WordPress bug. It is a mail-transport problem with a fixed diagnostic order: test with a password reset, log the real error with wp_mail_failed, switch to authenticated SMTP, pick a free provider tier, publish the SPF, DKIM, and DMARC records your provider gives you, and verify with real emails — not just the test button. Thirty minutes, once, and your mail starts arriving like it should have all along.
Checked and verified 24 November 2026. Install counts and free tiers change often — confirm the current figures on WordPress.org and the provider’s pricing page before you commit.
Further Reading & References
- wp_mail() — WordPress Developer Resources
- wp_mail_failed — WordPress Developer Resources
- phpmailer_init — WordPress Developer Resources
- Email sender guidelines — Gmail Help
- WordPress Not Sending Emails: Causes and Fixes — ExplainWP
- WordPress SMTP Setup: Fix Missing Site Emails — SmartWP
- SMTP in WordPress: how to set it up step by step (2026) — Mailrelay
- 8 Best Free Transactional Email Services in 2026 — Meta Box



