9 Ways to Fix WordPress Not Sending Emails
Most WordPress email troubleshooting advice starts and ends with WordPress itself — and that is almost always wrong. The platform sends emails through a standard PHP function, wpmail(), but the problem rarely lies in that function. Your host's mail server, a stray plugin, or a default-from-address mismatch are far likelier culprits. Before you touch a single line of code, understand this: WordPress trusts your server to handle delivery. When that trust breaks, the first fix is often environment-based, not code-based.
If your contact form submissions vanish, password reset emails never arrive, or WooCommerce order confirmations go missing, the quickest win is checking your server's mail log or installing a transactional email plugin. But let's walk through every fix, from simplest to most advanced, so you can restore your site's email delivery and keep your business running.
Before You Start: Backup and Database Check
Always back up your site and database before making any changes. A single misconfigured wp-config.php line or a plugin conflict can take your site offline. Use your hosting control panel's backup tool or a plugin like UpdraftPlus. Then, take a quick database snapshot — many email issues trace back to a corrupted wpoptions table.
Common Causes of WordPress Email Failure
- Your web host blocks or throttles outbound SMTP traffic on standard ports (25, 465, 587).
- Spam filters from the recipient's provider (Gmail, Outlook, Yahoo) reject emails from shared IP ranges.
- A plugin or theme overrides
wpmail()with incorrect SMTP credentials. - The default
[email protected]from address is not authenticated with SPF/DKIM records. - PHP's
mail()function is disabled on your server for security reasons. - Your contact form plugin uses a local mailer that fails silently.
Each cause has a specific fix. The following solutions are ordered from most likely to most technical, so start with number one and work your way down.
1. Test Email Delivery with a Plugin First
Before you assume the problem is deep, run a quick test. Install a lightweight plugin like Check & Log Email or WP Mail Logging. These tools intercept every email WordPress tries to send and show you the raw response. If the log says "Sent successfully" but the email never arrives, the issue is downstream — likely at the recipient's server or your domain's email authentication.
If the log shows an error like "Failed to connect to mailserver" or "SMTP connect() failed", then the problem is upstream — your server cannot establish a connection to an outgoing mail server. That is where the next fixes come in.
2. Switch to a Dedicated SMTP Plugin
The single most effective fix for WordPress email delivery is to bypass your host's mail server entirely by using a dedicated SMTP plugin. Plugins like WP Mail SMTP, Easy WP SMTP, or Post SMTP let you route emails through a reputable transactional email service such as SendGrid, Mailgun, or Amazon SES. These services have built-in SPF/DKIM authentication, analytics, and high delivery rates.
After activating the plugin, you will need to enter your SMTP credentials (server host, port, username, password). Most services provide these in their dashboard. Choose TLS encryption on port 587 for the most reliable delivery. Once configured, send a test email from the plugin's settings page.
3. Configure SPF, DKIM, and DMARC Records
Even if your SMTP settings are correct, recipient mail servers may reject your emails due to missing domain authentication. You need three DNS records: SPF (Sender Policy Framework) tells receiving servers which IPs are allowed to send mail for your domain. DKIM (DomainKeys Identified Mail) adds a digital signature. DMARC (Domain-based Message Authentication, Reporting, and Conformance) tells receivers what to do with unauthenticated mail.
Log into your domain registrar or DNS provider (e.g., Cloudflare, Namecheap, GoDaddy). Add an SPF record like v=spf1 include:spf.yourmailservice.com ~all. For DKIM, your email service will provide a TXT record. DMARC is a separate TXT record starting with v=DMARC1. Propagation can take up to 48 hours, so test email delivery again after the change.
4. Check Your From Email and Name
WordPress uses [email protected] as the default from address. Many mail servers flag this as spam because it does not match a real mailbox. You can change this with a snippet in your theme's functions.php or, better, in a site-specific plugin. Add the following code:
addfilter( 'wpmailfrom', function( $email ) { return '[email protected]'; } ); addfilter( 'wpmailfromname', function( $name ) { return 'Your Site Name'; } );Make sure the domain after the @ sign matches your actual site domain. Also ensure that mailbox actually exists or is forwarded to a real address — some servers reject mail from non-existent sender mailboxes.
5. Disable Email Sending Plugins One by One
Email-related plugins are the most common source of conflicts. A plugin like a contact form builder, membership plugin, or e-commerce extension may override wpmail() with its own mailer. If that mailer is misconfigured, all emails silently fail. Deactivate all plugins except a basic SMTP plugin. Then reactivate them one at a time, sending a test email after each activation.
When the email fails, you have found the conflicting plugin. Check its settings for an email tab — many plugins allow you to choose the mailer. Set it to "Use WordPress default" or configure it to use the same SMTP credentials you set in step two.
6. Add SMTP Credentials to wp-config.php
If you prefer not to use a plugin, you can configure SMTP directly in your wp-config.php file. This is an advanced option and requires careful syntax. Add the lines below just above the / That's all, stop editing! / line:
define( 'SMTPHOST', 'smtp.yourmailservice.com' ); define( 'SMTPPORT', 587 ); define( 'SMTPUSER', '[email protected]' ); define( 'SMTPPASS', 'your-email-password' ); define( 'SMTPAUTH', true ); define( 'SMTP_SECURE', 'tls' );Save the file and test. This method bypasses any plugin-based mailer, so if a plugin was interfering with SMTP, this forces a clean connection. Remember to keep credentials secure — never commit this file to a public repository.
7. Check Your Host's Email Policy and Ports
Shared hosting providers (Bluehost, HostGator, SiteGround) often block outbound connections on standard SMTP ports to prevent spam. They may force you to use their proprietary mail server. Log into your hosting control panel and look for a "Mail" or "Email" section. Some hosts offer a per-website setting to "Allow external SMTP" or "Enable local mail delivery".
If your host blocks port 25, try port 587 or 465. Port 587 with TLS is the most widely open. If all three ports fail, contact support and ask specifically whether outbound SMTP is blocked on your plan. If it is, you may need to upgrade or switch to a transactional email API (see fix eight).
8. Use a Transactional Email API (SendGrid, Mailgun, or Amazon SES)
Transactional email services offer API-based sending that bypasses SMTP entirely. This is the most reliable fix for high-volume sites or those on restrictive hosts. Sign up for a service like SendGrid or Mailgun, verify your domain, and generate an API key. Then use a plugin that supports API integration — WP Mail SMTP and Post SMTP both support Mailgun and SendGrid APIs.
Configure the plugin to use "Mailgun API" or "SendGrid API" instead of SMTP. Enter your API key and the verified sending domain. Test. API-based sending skips all port and authentication issues because the request goes over HTTPS, not SMTP protocols. Many services offer a free tier covering 10,000–12,000 emails per month, which covers most small to medium WordPress sites.
9. Debug PHP's mail() Function Directly
If you have exhausted all other fixes, the issue may be with PHP's mail() function itself. Create a simple PHP test file in your site's root directory:
<?php $to = '[email protected]'; $subject = 'Test'; $message = 'This is a test.'; $headers = 'From: [email protected]'; if ( mail( $to, $subject, $message, $headers ) ) { echo 'Mail sent.'; } else { echo 'Mail failed.'; }Access this file in your browser. If it says "Mail sent" but you never receive it, the PHP mail function works but the server's MTA (Mail Transfer Agent) is misconfigured. Contact your host with this evidence. If it says "Mail failed", PHP's mail() is disabled. Your only options are an SMTP plugin or an API-based service.
How to Prevent WordPress Email Problems
Once you restore email delivery, take preventive steps. First, monitor your email log weekly — a plugin like WP Mail Logging keeps a history. Second, set up email authentication (SPF/DKIM/DMARC) as part of your standard site setup, not a reactive fix. Third, test your contact forms after every plugin update, because a new version can override email settings. Fourth, keep your SMTP plugin active as a permanent layer between WordPress and your mail server, even if you think the problem is resolved.
For site owners who manage multiple WordPress installations, consider automating these checks. Tools like nativeWP can help you monitor and bulk-publish content across sites, but email health is a separate concern that requires proactive maintenance. The ten minutes you spend setting up DMARC today will save hours of troubleshooting later.
Frequently Asked Questions
Why is WordPress not sending emails to Gmail?
Gmail has aggressive spam filters. If your domain lacks SPF/DKIM records or your server is on a blacklisted IP range, Gmail silently drops the email. The fix is to install an SMTP plugin and authenticate your domain.
Can I fix WordPress email without a plugin?
Yes. You can add SMTP credentials directly to wp-config.php or configure PHP's mail() function with a custom php.ini file. However, a plugin simplifies management and logging, so it is recommended for most users.
How do I know if my host blocks email ports?
Run a port check using an online tool like PortChecker.co or use a command like telnet smtp.gmail.com 587 from your server's command line. A timeout or connection refused indicates a blocked port.
What is the best SMTP plugin for WordPress?
WP Mail SMTP is the most popular, free, and well-supported. It supports both SMTP and API-based services. Post SMTP and Easy WP SMTP are solid alternatives with similar features.
How often should I test my WordPress email delivery?
Test at least monthly and after every major update (WordPress core, plugin, or theme). Automated monitoring tools can send you a daily report of email log status.