Fix WordPress wp_mail() going to spam: the complete diagnostic + fix guide

WordPress sends mail from [email protected] by default — an address that fails SPF, DKIM, and DMARC. Here's why your wp_mail() emails land in spam and how to fix it.

8-minute readLast updated · June 2026WordPress setup guide →

Your WordPress site looks great. Your contact form looks great. A visitor submits it, the form says “Thanks, we’ll be in touch!” — and the notification email never arrives in your inbox. Or it arrives in spam. Or it arrives three hours late, after the lead has already moved on.

You’re not unlucky. WordPress email is broken by default — and most fixes only solve half of the problem. Here’s why, and how to fix it for good.

Why wp_mail() emails go to spam

WordPress’s built-in wp_mail() function is a thin wrapper around PHP’s mail() function. By default, when your site sends an email, three things happen that almost guarantee delivery problems:

1. The “From” address fails SPF

Out of the box, WordPress sends from [email protected] (where yourhost.com is your hosting provider’s server hostname — not your real domain). When Gmail or Outlook receive this message, they check whether your hosting provider is authorized to send mail for that domain. It usually isn’t. SPF check fails. Message goes to spam.

2. There’s no DKIM signature

Modern mail servers expect every legitimate email to be cryptographically signed with DKIM. PHP’s default mail() function doesn’t sign anything. Even if SPF passes, the lack of DKIM signature is a strong spam signal to Gmail and Outlook.

3. DMARC alignment is impossible

Even if you manually set the From address to your real domain, the underlying sending IP is your shared hosting server — which has zero relationship with your domain. DMARC checks fail. Gmail silently drops the message.

The shared-host nightmare

Most shared WordPress hosts (Bluehost, GoDaddy, HostGator, etc.) send mail through a shared IP pool that other customers’ sites also use. When some other site on the same server sends spam, the whole pool gets blocklisted — and your password reset emails start failing for days, with no warning.

Diagnose your WordPress delivery problem

Run these four checks in order:

1. Submit your contact form, password reset, or test order

Use a Gmail address you control. Wait 5 minutes. Check inbox AND spam folder. If it’s in spam, you have an SPF/DKIM/DMARC problem. If it’s missing entirely, you have a delivery problem.

2. Check your site’s mail log

Most WordPress sites don’t log outbound mail by default. If you have any SMTP / mail plugin installed (WP Mail SMTP, FluentSMTP, SecureSMTP), check its log for the recent send. Status should be “Delivered.” If status is “Failed,” the message never left your server.

3. Run a mail-tester.com diagnostic

Go to mail-tester.com (free, no signup). Send a test message from your WordPress site to the address they give you. Read the report. A score below 7/10 explains the problem.

4. Check the “From” address being used

Send yourself a test email and inspect the headers. Look for theFrom: line. If it says [email protected] instead of your real domain, that’s your problem in one line.

Three ways to fix WordPress email

Option 1: Configure SPF + DKIM manually (free, complex)

You can configure your hosting provider’s mail server to send from your real domain with proper SPF/DKIM/DMARC. This usually requires support tickets to your host, DNS record changes, and constant babysitting when records expire or get reset.

Pros: Free.
Cons: Most shared hosts don’t let you do this. Even on managed hosts, you’ll spend 4–8 hours setting it up and another 1–2 hours per month maintaining it. And it only fixes one site.

Option 2: Install an SMTP plugin + sign up for a mail service

Install WP Mail SMTP or FluentSMTP, then sign up for SendGrid / Mailgun / Brevo / SES, configure DKIM on the mail service side, paste credentials into the SMTP plugin, watch for quota errors and reputation problems.

Pros: Works reasonably well.
Cons: Two services to manage (the SMTP plugin and the mail provider). DKIM setup is non-trivial. Each provider has different quota tiers, billing, and dashboards. Total setup time: 2–4 hours for someone who’s done it before; a full afternoon for first-timers.

Option 3: Install the SecureSMTP plugin (recommended)

One plugin. One signup. Done. SecureSMTP combines the SMTP routing layer and the authenticated mail service in a single workflow — no third-party SMTP provider to configure, and only one DNS record to add for your sending domain.

  1. Sign up free at securessmtp.com/signup — 5,000 emails/month included, no card required.
  2. Dashboard → Forms → Sites → + Add Site. Copy the site’s API key from the last step. It is shown only once.
  3. WordPress Admin → Plugins → Add New Plugin → Upload Plugin → upload the SecureSMTP plugin .zip → Install Now → Activate.
  4. In wp-admin open SecureSMTP → Settings, paste the key into API Key and click Save and test connection. You should see “Connection OK”.
  5. Under Email Delivery, tick Route outgoing email through SecureSMTP and save. Until you tick it, WordPress keeps sending with its own mailer.
  6. Click Save and send test email to send yourself a test.

From then on, every email your site sends with wp_mail() (contact form notifications, password resets, WooCommerce order emails, comment notifications) goes through SecureSMTP and is signed with DKIM. New accounts send from their own verified sending domain (below). Older accounts can keep using [email protected] for a limited time, with your sender name, and the original From address becomes the Reply-To.

Send from your own domain

Add a sending domain in the dashboard (Sending Domains, or when you add a site). Any plan, including Free, can add one. Publish the DKIM TXT record it shows (the advanced setup adds two more records), then click Check DNS and verify. In the plugin choose “Send from my own domain”. From then on, email goes out from the address you set for that domain, and DMARC passes for your domain. See Domains and DNS.

Verify it’s working

  1. Run mail-tester.com again. Score should jump to 9+/10.
  2. Send yourself a test order or form submission. It should arrive in the inbox within a minute.
  3. Check the plugin Mail Log. The email is listed with status Sent. The Email log in your SecureSMTP dashboard shows whether it was delivered, and opens if tracking is on.
  4. Check Gmail’s “Show original” on the test email. DKIM should pass. DMARC passes for your own domain once you send from a verified sending domain.

wp_mail() vs SMTP plugins vs SecureSMTP

Featurewp_mail() defaultWP Mail SMTP + SendGridSecureSMTP plugin
Setup time0 min2–4 hoursA few minutes + DNS time
DKIM signingNoManual configAutomatic
Mail logNoLimitedFull per-plugin breakdown
Spam classifierNoNoAI scoring on every send
Hosted formsNoNoYes
Webhook eventsNoNoReal-time
CostFree (broken)$0–$15/moFree / $7/mo
Services to manage021

Frequently asked questions

Does this work on any WordPress host (managed, shared, VPS)?+

Yes. The plugin sends mail to the SecureSMTP API over HTTPS, so your host’s PHP mail() function and outgoing SMTP ports are not used. It works the same on shared, managed and VPS hosting, as long as the site can make outgoing HTTPS requests. It needs WordPress 6.0+ and PHP 8.0+.

What about WP Mail SMTP, FluentSMTP, and other SMTP plugins?+

WP Mail SMTP and FluentSMTP connect WordPress to a mail service you sign up for separately. You can point them at our SMTP settings (host smtp.securessmtp.com, port 587, username securessmtp, your site API key as the password). Or use the SecureSMTP plugin instead, which sends over our API and also shows hosted forms. Use one mail plugin, not two.

Will my WooCommerce / Gravity Forms / WPForms emails work too?+

Yes. Once Email Delivery is on, the plugin handles every wp_mail() call: WooCommerce order emails, Gravity Forms / WPForms / Forminator / Contact Form 7 / Elementor Forms notifications, password resets and comment notifications. No per-plugin setup. Emails that a plugin sends some other way (not with wp_mail()) are not affected.

What if the plugin or SecureSMTP API has an outage?+

If the API returns an error or cannot be reached, or the monthly limit is used up, the plugin sends that email with WordPress’s own mailer instead, so it still goes out (through the old path). The Mail Log marks it as “Fell back: API error”, so you can see it happened.

Do I need to set up SPF, DKIM, and DMARC records myself?+

New accounts send only from their own verified domain, so add a sending domain in the dashboard (any plan, including Free) and publish one DKIM TXT record; the advanced setup adds two more records so SPF aligns too. Until it is verified you can send test emails to yourself. Older accounts can keep using [email protected] for a limited time, with your sender name and the original From address as the Reply-To.

How is this different from just adding DKIM to my domain?+

DKIM only helps if WordPress's mail server is also allowed to sign for your domain. Most shared hosts don't expose DKIM configuration at the PHP mail() layer, so even if you add DKIM records, your wp_mail() emails won't be signed correctly. SecureSMTP signs every email with DKIM: as send.securessmtp.com in relay mode, or as your domain once you verify a sending domain. That works no matter how your host is set up.

Can I see which plugin/form sent which email?+

Yes. SecureSMTP → Mail Log in wp-admin lists every wp_mail() call with the source plugin, recipient, subject, status (sent, failed or queued) and time, and you can filter by source and status. Delivery results (delivered, bounced, opened) are in the Email log in your SecureSMTP dashboard, across all your sites.

Ready to fix it?

Free tier: 5,000 emails/month, no card. Set up SecureSMTP for WordPress →

Stop guessing whether your email is landing.

SecureSMTP sends your website and app email with SPF, DKIM and DMARC passing, from your own domain once you verify it, and logs every email. 5,000 free emails a month, no card required.

More delivery guides

Shopify · 7-min read

Shopify SMTP: why there is no SMTP setting, and how to send from your own domain

Shopify sends store emails itself and has no custom SMTP setting. Here’s how to authenticate your domain in Shopify, and when to send through the SecureSMTP API instead.

Squarespace · 6-min read

Squarespace email troubleshooting: why your form submissions aren't arriving

Form submitted. No email. Here’s how to check Squarespace’s notification settings and forward submissions through Zapier to SecureSMTP.

Webflow · 6-min read

Webflow form delivery: why form notifications go missing, and how to fix it

Webflow forms collect submissions reliably; the notification emails are the weak spot. Here’s how to send them through an automation tool and SecureSMTP instead.

Wix · 6-min read

Wix contact form email not working: how to fix it

Wix contact form submitted but no email arrived? Wix has no SMTP setting, so here’s how to send notifications through Zapier, Make or Velo code instead.

Ghost · 6-min read

Ghost email troubleshooting: when magic links and welcome emails miss

Ghost members not getting magic-link logins or welcome emails? Here’s how to send a self-hosted Ghost’s transactional email through SecureSMTP. Newsletters still need Mailgun.

Mailchimp Transactional · 7-min read

Mailchimp Transactional (Mandrill) email problems: how to diagnose and fix them

Mailchimp Transactional rebrand of Mandrill is confusing, expensive, and shares IPs across customers. Here's why delivery fails and the simpler alternative.

Fluent Forms · 5-min read

Fluent Forms not sending email? Here's why, and how to fix it

Fluent Forms submissions arrive in the dashboard but the notification email never lands? It's a wp_mail() problem, not a Fluent Forms bug. Here's the real fix.

Forminator · 6-min read

Forminator email setup: configure notifications that actually arrive

Forminator notification emails going to spam — or missing entirely? It's WordPress's wp_mail() problem, not Forminator. Here's the fix that works on any host.

WP Mail SMTP · 6-min read

WP Mail SMTP setup with SecureSMTP: the Other SMTP settings, step by step

Use the WP Mail SMTP plugin with SecureSMTP as your SMTP server. The exact Other SMTP settings, how to keep your key out of the database, how to test, and what to do when it fails.