14+ years building on WordPress / Replies in under 5 hours
Troubleshooting 15 min read · Updated November 2026

WordPress Not Sending Emails? How to Find the Cause and Fix It

Photo of Ajay Khandal
Ajay Khandal
WordPress Developer
WordPress not sending emails: a failed email fixed by sending through SMTP with SPF, DKIM and DMARC
Key takeaways

WordPress sends mail through PHP's mail function by default, which many hosts block and Gmail and Yahoo often filter, so emails vanish or land in spam.

  • Test first: log every email with a plugin such as WP Mail Logging, then send a test to a Gmail inbox and to mail-tester.com.
  • The lasting fix is to send through an authenticated SMTP or email API service, from an address on your own domain, with SPF, DKIM and DMARC records published.
  • WooCommerce sends no email while an order is Pending payment. Check WooCommerce > Status > Logs > transactional-emails to see exactly what happened.

WordPress not sending emails is one of the most common problems I get asked to fix, and it rarely announces itself. A contact form quietly drops leads for weeks. A customer never gets their order confirmation. A password reset link never arrives, and nobody notices until someone complains.

The cause is almost always one of a short list, and a simple test tells you which one. This guide explains why WordPress emails fail, how to test what is happening, the seven fixes in the order I apply them, and the extra checks for contact forms and WooCommerce stores.

Why is WordPress not sending emails?

By default, WordPress sends email through PHP’s mail function on your web server, with no login and no authentication. Many hosts block or limit that route, and Gmail and Yahoo now filter or reject mail that fails SPF or DKIM checks. So the message either never leaves your server, or it arrives looking suspicious and gets dropped.

Under the hood, WordPress uses its wp_mail() function, which hands the message to the PHPMailer library. Unless something tells it otherwise, the sender address is wordpress@yourdomain.com. WordPress core’s own source code admits the weakness here: “Some hosts will block outgoing mail from this address if it doesn’t exist.”

There is a second trap. The WordPress documentation says a true return value “does not automatically mean that the user received the email successfully.” It only means the message was handed over without an error. That is why a form plugin can show “Thank you, your message was sent” while the email goes nowhere.

These are the causes I find most often, with what each one looks like:

Cause What you notice Where to check
Host blocks or limits PHP mail Nothing arrives anywhere, and no error is shown Your hosting provider’s email documentation
Cloud server blocks port 25 SMTP connections time out Your cloud provider’s networking rules
From address is not on your domain Emails land in spam or disappear Form and plugin notification settings
Missing SPF, DKIM or DMARC records Spam folder placement, Gmail rejections Your domain’s DNS records
Broken SPF record Delivery fails after you add a new email service Your domain’s DNS records
Plugin or theme conflict Some emails send and others never do A staging copy with plugins disabled
WooCommerce order stuck in Pending payment No order emails for some orders WooCommerce > Orders

Cloud servers deserve a special mention because they surprise people. Google Cloud blocks outbound connections on port 25 to external addresses. AWS blocks outbound port 25 by default on EC2 instances and Lambda functions. DigitalOcean blocks ports 25, 465 and 587 on Droplets by default and recommends a third-party email service. If your site runs on a VPS, PHP mail may have no working route out at all, and that alone explains WordPress not sending emails on many cloud servers.

The inbox side changed too. Since 1 February 2024, Google requires every sender to Gmail to use SPF or DKIM, have valid forward and reverse DNS, use TLS, and keep the spam rate below 0.3%. Senders of more than 5,000 messages a day also need DMARC. Yahoo’s sender requirements set the same baseline. An unauthenticated WordPress email from a shared server fails most of those tests.

How do you check if WordPress is sending emails at all?

Trigger a real email, such as a password reset or a test form entry, and send it to two different inboxes, for example a Gmail address and your work address. Check both spam folders, then check a mail log. If nothing was logged, WordPress never sent it. If it was logged but never arrived, delivery is the problem.

Here is the test I run on every site with WordPress not sending emails:

  1. Install a mail logging plugin such as WP Mail Logging, which has more than 300,000 active installations. It records every email WordPress tries to send, plus any error.
  2. Trigger the email that is failing. Use the real form or the real checkout, not a different email, because each one can fail for a different reason.
  3. If you have WP-CLI access, send a test straight from the server: wp eval "var_dump( wp_mail( 'you@example.com', 'Test', 'Test body' ) );". A result of bool(false) means PHP mail or SMTP refused the message on the spot.
  4. Send one message to the address shown on mail-tester.com. It scores the email and shows whether SPF, DKIM and DMARC pass.

Read the result like this:

What the log shows What it means Go to
No entry at all WordPress or the plugin never tried to send Fix 5 and Fix 6
Entry marked failed, with an error The server or SMTP login rejected it Fix 2 and Fix 7
Entry marked sent, but nothing arrived The receiving inbox filtered or rejected it Fix 1, Fix 2 and Fix 4

If you prefer not to add a plugin, log failures to your debug log instead. WordPress fires the wp_mail_failed action (added in version 4.4) whenever sending throws an error. Put this in a small must-use plugin and turn on WP_DEBUG_LOG, as explained in my guide to common WordPress errors:

add_action( 'wp_mail_failed', function ( $error ) {
    error_log( 'wp_mail failed: ' . $error->get_error_message() );
} );

How do you fix WordPress not sending emails?

Send WordPress mail through an authenticated SMTP or email API service, use a From address on your own domain, and publish SPF, DKIM and DMARC records for that domain. Those three changes fix most of the cases I see. The other fixes below cover form settings, plugin conflicts and servers that block mail ports.

Work through these fixes for WordPress not sending emails in this order. Each one builds on the one before.

Fix 1: Send from an address on your own domain

Set the From address to a real mailbox on your website’s domain, such as hello@yourbusiness.com. Never use a free address like Gmail as the From address on your site, and never use the visitor’s own email address. Both make your message look forged, because your server has no right to send for those domains.

If you want replies to go to the visitor, put their address in the Reply-To header instead. You get the same convenience without failing authentication. Most SMTP plugins can force the From address for every email on the site, which also fixes plugins that set their own.

Fix 2: Connect an SMTP or email API service

This is the fix that solves the problem of WordPress not sending emails for good. Instead of PHP mail, WordPress logs in to a proper mail service and sends through it, the same way your email app does. The most widely used WordPress SMTP plugin is WP Mail SMTP, which has more than 4 million active installations and a free version.

Which service to connect depends on the site:

Option Good fit for Watch out for
Your Google Workspace or Microsoft 365 mailbox Brochure sites and contact forms with low volume Mailbox sending limits, and app passwords or OAuth setup
A transactional email service such as Brevo, Mailgun, Postmark or SendGrid WooCommerce stores, membership sites, anything sending receipts You must verify your domain with DNS records
Amazon SES High volume, if you are comfortable in AWS More setup than the other options
Your host’s SMTP server A quick fix on shared hosting You share sending reputation with other customers

For a store, I always pick a transactional service over a personal mailbox. Order and password emails are the ones customers notice when they go missing.

Fix 3: Set up WordPress SMTP in code without a plugin

If you would rather not add a plugin, WordPress lets you configure PHPMailer directly through the phpmailer_init hook. Keep the credentials in wp-config.php, outside the database:

// wp-config.php
define( 'SMTP_HOST', 'smtp.example.com' );
define( 'SMTP_PORT', 587 );
define( 'SMTP_USER', 'postmaster@yourbusiness.com' );
define( 'SMTP_PASS', 'your-smtp-password' );
define( 'SMTP_FROM', 'hello@yourbusiness.com' );

Then add this to a must-use plugin in wp-content/mu-plugins/:

add_action( 'phpmailer_init', function ( $phpmailer ) {
    $phpmailer->isSMTP();
    $phpmailer->Host       = SMTP_HOST;
    $phpmailer->Port       = SMTP_PORT;
    $phpmailer->SMTPAuth   = true;
    $phpmailer->Username   = SMTP_USER;
    $phpmailer->Password   = SMTP_PASS;
    $phpmailer->SMTPSecure = 'tls';
    $phpmailer->setFrom( SMTP_FROM, get_bloginfo( 'name' ), false );
} );

Port 587 with TLS works on almost every provider, and it is the WordPress SMTP setting I start with. Use the exact host, port and login your email service gives you, and test on a staging site first.

Fix 4: Add SPF, DKIM and DMARC records

Once WordPress sends through a real service, tell the world that service is allowed to send for your domain. You do that with three DNS records, explained in the next section. Your email service shows the exact values to add during domain verification.

Fix 5: Check your form and plugin notification settings

If the log shows no entry at all, the email was never triggered. Open the form’s notification settings and check that notifications are switched on, the To address is current, and conditional rules are not blocking it. The contact form section below covers this in detail.

Fix 6: Rule out a plugin or theme conflict

When some emails send and others never do, a conflict is likely. Two SMTP plugins fighting each other is a classic one. Disable plugins one at a time on a staging copy and test after each, using the method in my guide to finding plugin conflicts.

Scheduled emails, such as reminders and renewal notices, have one extra dependency. They usually run through WP-Cron, so if WP-Cron has stopped, those emails stop too. My guide to fixing WP-Cron shows how to check.

Fix 7: Work around servers that block mail ports

On Google Cloud, AWS or similar servers, skip port 25 entirely and connect to your email service on port 587 or 465. Google Cloud states it does not restrict outbound traffic on ports 587 or 465. On DigitalOcean, where those ports are blocked too, use an email service with an HTTP API instead of a WordPress SMTP connection. WP Mail SMTP sends through the provider’s API for services such as Brevo, Mailgun, Postmark and SendGrid, which its plugin page says works even when a host blocks SMTP ports.

What are SPF, DKIM and DMARC, and do you need all three?

SPF lists the servers allowed to send email for your domain. DKIM adds a signature that proves the message came from you and was not altered. DMARC tells inboxes what to do when those checks fail. Gmail requires SPF or DKIM from every sender, and all three above 5,000 messages a day. Set up all three.

Record What it does Example
SPF (TXT record on your domain) Lists the services allowed to send for your domain v=spf1 include:_spf.google.com ~all
DKIM (TXT or CNAME record) Publishes the public key that checks each message’s signature Generated by your email service
DMARC (TXT record at _dmarc) Sets the policy for failed checks and where reports go v=DMARC1; p=none; rua=mailto:dmarc@yourbusiness.com

The SPF example above is the record Google publishes for Google Workspace. Your own record should include every service that sends for your domain, such as your mailbox provider and your transactional service.

Two SPF mistakes break delivery even when everything else is right, and both come from the SPF standard, RFC 7208:

  • A domain must have only one SPF record. If you add a second one for a new service, checks return a permanent error. Merge the new include: into your existing record instead.
  • SPF allows at most 10 DNS lookups. Every include: counts, and so do includes inside them. Going over the limit also returns a permanent error, which is why delivery sometimes breaks right after a new tool is added.

Start DMARC at p=none so nothing is blocked while you read the reports. Once every legitimate service passes, move to p=quarantine and later p=reject. Yahoo’s bulk sender rules accept p=none as the minimum.

Why is my WordPress contact form not sending emails?

Usually the form uses the visitor’s email as the From address, the notification is switched off, or it goes to an old inbox. Set the From address to one on your domain, put the visitor’s address in Reply-To, and check the To field. Then submit a test entry and confirm it appears in your mail log.

Every major form plugin has these settings in the notification or mail panel of the form. In WPForms and Gravity Forms they sit under Notifications. In Contact Form 7 they are on the Mail tab, where you can add Reply-To: [your-email] under Additional headers. If the form uses the visitor’s address as From, change it. That single setting is behind most of the contact form cases I see.

Also check that anti-spam settings are not too aggressive. A strict honeypot or captcha can block real submissions before any email is sent. My guide on stopping WordPress form spam covers settings that stop bots without losing genuine leads.

Finally, turn on entry storage if your form plugin offers it. Then a delivery failure never costs you the lead itself, because the message is saved in your dashboard either way.

Why is WooCommerce not sending emails for orders?

WooCommerce only sends order emails when an order changes status, so an order stuck in Pending payment sends nothing. Check the order status first, then confirm the email is enabled under WooCommerce > Settings > Emails. If both look right, open the transactional-emails log under WooCommerce > Status > Logs to see exactly what happened.

The WooCommerce email documentation confirms that no email is triggered while an order is Pending payment. If you were paid but the order is still pending, the payment gateway is not updating your site, and that is a gateway problem. My WooCommerce checkout fix guide walks through gateway issues.

Current versions of WooCommerce log every transactional email attempt under the log source transactional-emails. Each entry has one of four results:

Log result What WooCommerce means by it What to do
Sent The email was handed to your site’s mail system Treat it as a delivery problem and apply Fixes 1, 2 and 4
Failed The mail system returned an error, usually with a reason Read the reason, then apply Fix 2 or Fix 7
Disabled The email type is turned off in the email settings Tick “Enable this email notification”
Skipped A required condition was missing, such as a recipient Check the recipient field and the order’s customer details

Sent and failed attempts for an order also appear as private order notes, so you can check a single order without opening the logs. Also check the recipient of the New order email. It often still points to the developer or an old staff address from when the store was built.

For a store, order emails are part of the checkout. If customers do not get a receipt, some will email you, some will open a dispute, and some will simply not come back. If you want this handled properly, I set up email delivery as part of WooCommerce development.

How do you stop WordPress emails going to spam?

Emails go to spam when inboxes cannot verify who sent them or do not trust the sender. Send through an authenticated service, use a From address on your own domain, and make sure SPF, DKIM and DMARC all pass and align with that domain. Then test with mail-tester.com and keep your spam complaint rate low.

A checklist that covers the usual causes:

  • Use the same domain in the From address as the one you authenticated with SPF and DKIM. Google requires this alignment for bulk senders.
  • Keep newsletters and marketing on a separate service from order and password emails, so a bad campaign does not hurt your receipts.
  • Keep your spam rate below 0.3%, the limit Google sets for all senders.
  • If you send larger volumes to Gmail, register your domain in Google Postmaster Tools to watch your reputation and spam rate.
  • Write plain, specific subject lines. An order email titled “Your order #1042 from Your Business” gets opened. “Important update!!” looks like spam to people and filters alike.

How do you stop email problems coming back?

Most repeat failures come from changes made somewhere else: a host migration, a new marketing tool added to DNS, or a plugin update. Keep a mail log running, test your main forms and checkout after every significant change, and recheck your SPF record whenever a new service starts sending email for your domain.

These are the moments when I recheck email on client sites, because each one is a common trigger for WordPress not sending emails again:

  • After moving hosts or changing DNS provider. Records get lost in transfers, which is why email is on my WordPress migration checklist.
  • After adding any tool that sends as your domain, such as a CRM, help desk or newsletter platform.
  • After major plugin or theme updates, especially to forms, SMTP or WooCommerce.
  • Before launch. Email testing is part of my post-launch checklist for good reason.

On staging sites, do the opposite and block outgoing email. Otherwise a copied production database can send real customers test order emails. A monthly test of every form is also part of my WordPress care plans.

When should you get a developer to fix WordPress emails?

Call a developer when the fixes above need access you do not have, such as DNS or server settings, or when the site makes money from email: stores, bookings and membership sites. Also call one if emails worked for years and suddenly stopped, because that usually points to a server or DNS change somebody else made.

Fixing WordPress not sending emails properly usually means checking the host, the DNS records, the SMTP service and every plugin that sends mail, then testing each email type end to end. If you would rather hand that over, my WordPress bug fix service covers it, often the same day. You can also send me the details and I will tell you where your emails are getting lost.

Frequently asked questions

WordPress reports success when the message is handed to the mail system without an error. Its documentation says a true result does not mean the recipient received the email. The receiving inbox can still filter or reject it, so check a mail log and test with mail-tester.com.

No, but it is the easiest route for most site owners. A WordPress SMTP plugin such as WP Mail SMTP has a free version and connects your site to a proper mail service. Developers can configure the same connection in code with the phpmailer_init hook instead.

Yes. Connect your Google Workspace mailbox through an SMTP plugin, ideally with OAuth, and send from an address on your own domain. It suits contact forms and low-volume sites. For a store sending receipts, a transactional email service is the safer choice.

The new server may block PHP mail or outgoing mail ports, or your SPF and DKIM records may not have moved with the DNS. Run a test with a mail log and mail-tester.com, then add the records your email service requires to the new DNS zone.

WooCommerce sends nothing while an order is Pending payment, and nothing for email types that are disabled under WooCommerce > Settings > Emails. Check the transactional-emails log under WooCommerce > Status > Logs, which marks each email as sent, failed, disabled or skipped.

Inboxes cannot verify who sent them. Send through an authenticated service, use a From address on your own domain, and make sure SPF, DKIM and DMARC pass and align with that domain. Google also expects your spam complaint rate to stay below 0.3%.

Photo of Ajay Khandal

Written by Ajay Khandal

I'm a freelance WordPress developer with 14+ years of experience building, fixing, and speeding up sites for businesses, agencies, and store owners across the US, UK, Europe, and Australia. I specialize in custom themes, WooCommerce, and performance, the kind of work that shows up as faster load times and fewer support tickets. You work directly with me, and replies typically arrive within 5 hours.

Work with me →