WordPress wp_mail() Not Sending Emails? Complete Fix
You submitted a contact form. Nothing happened. Or you tried to reset your password. No email arrived. Or you're expecting admin notifications and they never show up.
The problem isn't your contact form plugin. It's not your WordPress installation. It's that your host blocks or misconfigures WordPress's default email function (wp_mail). And WordPress silently fails without telling you.
This post is the complete fix. Step-by-step, with multiple solutions from free to paid.
Why WordPress Emails Fail (The Root Cause)
WordPress uses PHP's built-in mail() function to send emails. This function routes through your server's mail system, which most hosts restrict or disable entirely.
Why? Security and deliverability:
- Hackers abuse the mail() function to spam
- Emails sent from mail() often land in spam (no authentication)
- Cheap shared hosting can't support mail() reliably
- ISPs block emails from residential/shared hosting IPs
Result: Your WordPress site sends emails into the void. They disappear. They go to spam. They get bounced. Your site owner never knows it happened.
The fix: Replace wp_mail() with SMTP (Simple Mail Transfer Protocol). SMTP is the industry standard for email. It authenticates your messages and routes them through a trusted service. Emails actually arrive.
Diagnose: Is Your Site Actually Sending Emails?
Before you fix anything, verify the problem exists.
Test #1: Send a Test Email
- Go to WordPress > Users > Your Profile
- Scroll down to "Email" field
- Make sure it shows a real email address
- Go to Settings > General > check "Administration Email Address"
- Trigger an action that sends email:
- Create a new post as Draft, then change to Publish (should send notification)
- Or submit a contact form (should send confirmation to user and admin)
- Wait 5 minutes
- Check your inbox AND spam folder
Result interpretation:
Email arrives in inbox: ā Your site IS sending emails. Your problem is different (possibly plugins, settings, or contacts). Most of this post doesn't apply.
Email appears in spam folder: ā ļø Your site is sending, but emails are marked as spam. Go to "Fix #7: Add SPF & DKIM Records" section.
No email, checked everywhere: ā Emails aren't being sent. Continue to the fixes below.
Test #2: Check Site Health
- Go to WordPress > Tools > Site Health
- Look for "Mail Configuration" or "SMTP" warnings
- If it says "The loopback request to your site failed" or "Unable to send mail", that confirms the problem
The Fixes (In Priority Order)
Fix #1: Install WP Mail SMTP Plugin (Fastest, Most Popular)
Why it works: WP Mail SMTP replaces wp_mail() with SMTP, which actually sends emails reliably.
What it costs: Free version available. Pro version is $149-399/year (but free tier is usually sufficient).
Step-by-step:
- Go to Plugins > Add New
- Search for "WP Mail SMTP"
- Click "Install Now" > "Activate"
- WP Mail SMTP will prompt you with a setup wizard (click "Let's Get Started")
- Choose your mailer (see section below for options)
- Fill in the connection details
- Go to WP Mail SMTP > Tools > Email Test
- Send a test email to yourself
- Confirm you received it in inbox (check spam too)
Expected result: Test email arrives. Your WordPress emails now work.
Fix #2: Choose Your Email Service (Mailer)
WP Mail SMTP works with many services. Which one?
Option A: Use Gmail (Cheapest, if you have Google Workspace)
- Pros: Free, simple 1-click setup, 100+ emails/day limit
- Cons: Requires Google Workspace account ($6-18/mo per email)
- Best for: Small sites that already use Google Workspace
Steps:
- In WP Mail SMTP, select "Gmail" as mailer
- Click "Connect with Google"
- Authorize the app (automatic OAuth, very easy)
- Done. Gmail is now your SMTP provider.
Option B: Use Brevo (Free Tier, 300 Emails/Day)
- Pros: Free, no credit card, 300 emails/day, dedicated transactional service
- Cons: Limited to 300/day (sufficient for most small sites)
- Best for: Small to medium sites, contact forms, password resets
Steps:
- Go to brevo.com and create free account
- Verify your email
- Go to Settings > SMTP & API > API Keys > Generate new API key
- Copy the API key
- In WP Mail SMTP, select "Brevo" as mailer
- Paste your API key in the "API Key" field
- Set "From Email" to your domain email (e.g., admin@yoursite.com)
- Click "Test Connection"
- Send test email via WP Mail SMTP > Tools > Email Test
Option C: Use SendGrid (Free Tier, 100 Emails/Day)
- Pros: Free, simple setup, reliable
- Cons: Limited to 100/day, requires credit card for upgrade
- Best for: Testing, very small sites
Steps:
- Go to sendgrid.com and create free account
- Verify email
- Go to Settings > API Keys > Create API Key (Full Access)
- Copy the key
- In WP Mail SMTP, select "SendGrid" as mailer
- Paste API key
- Test connection and send test email
Option D: Use Mailgun (Free Tier, 100 Emails/Month)
- Pros: Free, developer-focused, excellent documentation
- Cons: Very limited free tier, requires credit card
- Best for: Developers, technical sites
Option E: Use Your Domain's Email (Most Professional)
- Pros: Sends from your actual domain email, most trusted
- Cons: Requires you to have a domain email account (e.g., admin@yoursite.com)
- Best for: Professional sites, higher deliverability
Steps:
- Create an email account on your domain via hosting control panel (cPanel/Plesk)
- In WP Mail SMTP, select "Other SMTP"
- Enter these details (from your host's documentation):
- SMTP Host: mail.yoursite.com (check with your host)
- SMTP Port: 465 or 587
- Encryption: SSL or TLS
- Username: your-email@yoursite.com
- Password: email account password
- Click "Test Connection"
My recommendation for 2026: Use Brevo, SendLayer, or SMTP.com for small to medium sites. They're reliable and Brevo's free tier (300 emails/day) is generous. For higher volume, Brevo's paid plans ($20-50/mo) are excellent.
Fix #3: Use FluentSMTP Plugin (Fully Free Alternative)
Why it works: Free, no limits, full-featured SMTP plugin.
What it costs: Free (no pro version)
Step-by-step:
- Go to Plugins > Add New
- Search for "FluentSMTP"
- Install and Activate
- Setup wizard appears automatically
- Choose your mailer (Gmail, Brevo, SendGrid, or "Other SMTP")
- Configure mailer details (same as WP Mail SMTP above)
- Test email
When to use FluentSMTP vs WP Mail SMTP:
- FluentSMTP: You want completely free, no upsells, no premium tier temptation
- WP Mail SMTP: You want the most popular option with best documentation and larger community
Either works equally well. Pick based on your preference.
Fix #4: Use Brevo's Native WordPress Plugin (Alternative)
Why it works: Purpose-built for WordPress, no 3rd party plugin needed.
What it costs: Free (with Brevo account)
Step-by-step:
- Create Brevo account (brevo.com, free tier 300 emails/day)
- Generate API key (Settings > SMTP & API > API Keys > Generate)
- Go to WordPress Plugins > Add New
- Search for "Brevo"
- Install the plugin by Brevo
- Activate it
- Go to Brevo menu in WordPress sidebar
- Paste your API key
- Check "Yes" to enable Brevo for WordPress emails
- Test email
Advantage: Brevo's plugin is tightly integrated with Brevo service. If something breaks, Brevo can troubleshoot directly.
Fix #5: Add SPF & DKIM Records (Stop Emails Going to Spam)
Why this matters: Even with SMTP, emails land in spam if your DNS records aren't set up. SPF and DKIM tell email providers "yes, this email really came from my domain."
The fix:
Step 1: Get SPF & DKIM records from your email service
- Brevo: Settings > Sender & Domain > Verify Domain
- SendGrid: Settings > Sender Authentication
- Gmail: Not needed (Gmail's reputation does this for you)
Step 2: Add SPF record to your domain DNS
- Log into your domain registrar (GoDaddy, Namecheap, etc.) or hosting control panel
- Go to DNS/DNS Records
- Add a new TXT record with:
- Name: @ (or leave blank)
- Type: TXT
- Value: v=spf1 include:brevo.com ~all (or whatever your provider gives you)
- Save
- Wait 24 hours for DNS to update
Step 3: Add DKIM record (optional but recommended)
- Email service provides a DKIM key pair (two long strings)
- Go to DNS in your domain registrar
- Add another TXT record with the DKIM value
- Save
- Wait 24 hours
Verification: Go back to your email service dashboard and click "Verify Domain" or similar button. If DNS records are correct, verification passes.
Expected result: After SPF & DKIM verification, emails arrive in inbox (not spam).
Fix #6: Test Email Delivery & Check Logs
After setting up SMTP, verify emails actually work.
Step 1: Send test email via plugin
- If using WP Mail SMTP: WP Mail SMTP > Tools > Email Test > Send Email
- If using FluentSMTP: FluentSMTP > Tools > Send Test Email
- Wait 2-5 minutes
- Check inbox and spam folder
Step 2: Check email logs (if using WP Mail SMTP Pro)
- WP Mail SMTP > Logs
- Look for your test email
- Check status: "Sent", "Delivered", "Bounced", or "Failed"
- If "Failed", click to see error message
Step 3: Check your email provider's dashboard
- Brevo: Dashboard > Emails > Activity or Suppressed (to find bounces)
- SendGrid: Mail > Activity > Search for your email address
- Gmail: No logging available
Possible outcomes:
"Delivered" but not in inbox: Email went to spam. Add SPF/DKIM records (Fix #5) to improve reputation.
"Bounced": Invalid email address or email provider rejected it. Check the error code for details.
"Failed": SMTP authentication failed. Recheck your API key or SMTP credentials.
"Sent successfully": ā Your WordPress emails are working!
Fix #7: Contact Your Host (If Using Domain Email and SMTP Fails)
If you chose "Other SMTP" and are using your domain's email account, your host controls these settings.
Ask your host for:
- SMTP host (usually mail.yoursite.com or mail.yourdomain.com)
- SMTP port (usually 465 or 587)
- Encryption type (SSL or TLS)
- Are SMTP credentials the same as cPanel/FTP login?
- Is SMTP enabled for my hosting account?
Common issues hosts report:
- "SMTP is disabled on your plan" ā Upgrade to a plan that supports it
- "Port 587 is blocked" ā Try port 465 instead
- "Authentication failed" ā Reset your cPanel password and try again
Email Not Arriving? Troubleshooting
Email Shows "Sent" in Logs But Doesn't Arrive
Problem: WP Mail SMTP says "Sent" but you never get the email
Causes & fixes:
- Landed in spam: Add SPF/DKIM records (Fix #5). Check Gmail/Outlook spam folder. You can mark as "Not Spam" and Gmail learns.
- Soft bounce: Temporary delivery failure. Mailbox full, server down, etc. Usually resolves itself. Resend test email.
- Hard bounce: Permanent failure. Invalid email address, domain doesn't exist, etc. Check the email address is correct.
Email Shows "Failed" in Logs
Problem: WP Mail SMTP shows error: "Failed"
Common errors & fixes:
Error: "Invalid credentials"
ā Re-check your API key or SMTP username/password. Typos are common.
Error: "SMTP authentication failed"
ā If using domain email: contact your host. If using Brevo/SendGrid: regenerate API key.
Error: "Connection timed out"
ā Firewall blocking SMTP port. Try different port (if 587 fails, try 465). Or contact host.
Error: "TLS required"
ā Change "Encryption" setting to TLS instead of SSL (or vice versa). Try both.
Emails Sent Before Fix Are Lost
Problem: Contact form was submitted days ago. Still no email. Even after fixing, nothing retroactive sends.
Answer: Emails already lost. WordPress doesn't queue failed emails or resend them later. They're gone. Going forward, all emails will work.
Workaround: For WooCommerce orders or critical emails, set up retry logic or use plugins like WP Mail Queue (sends failed emails on a schedule).
Email Volume: Which Service to Use
| Email Volume | Best Service | Cost | Notes |
|---|---|---|---|
| 0-100/day (contact forms, resets) | Brevo Free | Free (300/day limit) | Overkill, but reliable |
| 100-1,000/day | Brevo Paid ($20/mo) | $20-50/mo | 300 emails/day included, then pay per overage |
| 1,000+/day (newsletters, order emails) | SendGrid, Mailgun, Postmark | $10-30/mo | Dedicated transactional service for high volume |
| Email is just password resets | Gmail via Google Workspace | $6-18/mo (workspace cost) | If you already use Google Workspace |
The Real Talk
WordPress's default email system (wp_mail via PHP's mail function) is broken on most hosting. This isn't an opinion ā it's why 3 million+ WordPress sites use WP Mail SMTP.
The fix is simple: install an SMTP plugin, pick Brevo (free), configure in 5 minutes, and your emails work. The entire process takes less time than debugging why emails failed in the first place.
Every WordPress site should do this on day one, before launch. Emails are critical: password resets, contact form confirmations, admin notifications, WooCommerce receipts. Broken email = broken user experience.
Stop guessing why emails don't work. Use SMTP. Problem solved.
