---
title: "WordPress Emails Not Sending or Going to Spam: How to Fix It"
description: "Contact form or order emails missing or in spam? Fix the From address, send through SMTP, and check SPF, DKIM and DMARC. Steps that worked on a live site."
url: "https://rajangupta.com/wordpress-emails-not-sending-or-going-to-spam-how-to-fix-form-and-order-emails/"
agent:
  instructions: "Use this search API to find relevant pages on rajangupta.com with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown. Any page is also available as Markdown by adding .md to its URL."
  endpoint: "https://rajangupta.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://rajangupta.com/llms.txt"
---

1. [Home](https://rajangupta.com/) /
2. [Blogs](https://rajangupta.com/blog/) /
3. WordPress Emails Not Sending or Going to Spam: How to Fix Form and Order Emails

Blogs

# WordPress Emails Not Sending or Going to Spam: How to Fix Form and Order Emails

December 3, 2026

By [Rajan Gupta](https://rajangupta.com/about/)

• ⏱ 4 min read

A customer fills in your contact form and you never hear about it. An order is placed and no confirmation email arrives. Or the emails do arrive, but in the spam folder, days later. This is one of the most common WordPress problems, and it hurts quickly because every missing email can be a lost lead.

## Table of Contents

1. Why WordPress emails go missing
2. Step 1: Send a test and see where it goes
3. Step 2: Stop using the visitor's email as the From address
4. Step 3: Send through a real mailbox with SMTP
5. Step 4: Check the three DNS records
6. Step 5: Check the other usual suspects
7. Step 6: Keep a safety net
8. Related reading
9. Want it checked for you?

I ran into it on my own site: enquiry notifications were sent from one address to the same mailbox and kept landing in Junk, until the site started sending through an authenticated mailbox. The fix below is the one that worked.

## Why WordPress emails go missing

By default, WordPress hands the message to the web server's built-in mailer (PHP's `mail()` function). That message is not signed with your domain's keys, it comes from the hosting server's address, and many mailbox providers treat it as suspicious. Some hosts also limit or block it. Spam filters look at three things: whether the sending server is allowed (SPF), whether the message is signed (DKIM), and whether those results match your From address (DMARC).

## Step 1: Send a test and see where it goes

Use a plugin's built-in test, or from the command line if you have WP-CLI:

```
wp eval 'var_dump( wp_mail( "you@gmail.com", "Test from my site", "Testing." ) );'
```

"true" only means WordPress handed the message to the mailer, not that it was delivered. Check the inbox and the spam folder. In Gmail, open the message, click the three dots, then "Show original". Look for SPF, DKIM and DMARC lines. "PASS" on all three is what you want.

## Step 2: Stop using the visitor's email as the From address

Many contact form plugins set the From address to whatever the visitor typed. That looks like forgery to the receiving server, because your site is not allowed to send as that person's domain. Set the From address to an address on your own domain, such as `website@yourdomain.com`, and put the visitor's address in the Reply-To field. You can still reply to the person with one click.

## Step 3: Send through a real mailbox with SMTP

The reliable fix is to send through an authenticated mailbox or a transactional email service. Create a mailbox on your domain (most hosts include a few), and have WordPress log in to it. This small plugin-free snippet goes in a must-use plugin or your theme's `functions.php`, with the credentials kept in `wp-config.php`, not in the code:

```
/**
 * Send wp_mail() through an authenticated mailbox.
 */
function rajangupta_smtp_config( $phpmailer ): void {
    if ( ! defined( 'RAJANGUPTA_SMTP_USER' ) || ! defined( 'RAJANGUPTA_SMTP_PASS' ) ) {
        return;
    }
    $phpmailer->isSMTP();
    $phpmailer->Host       = 'smtp.yourhost.com';
    $phpmailer->Port       = 465;
    $phpmailer->SMTPSecure = 'ssl';
    $phpmailer->SMTPAuth   = true;
    $phpmailer->Username   = RAJANGUPTA_SMTP_USER;
    $phpmailer->Password   = RAJANGUPTA_SMTP_PASS;
    $phpmailer->Sender     = RAJANGUPTA_SMTP_USER;
}
add_action( 'phpmailer_init', 'rajangupta_smtp_config' );
```

Your host's documentation gives the exact server name and port. If you'd rather not touch code, an SMTP plugin does the same job.

## Step 4: Check the three DNS records

- **SPF** is a TXT record that lists the servers allowed to send for your domain. Your mail provider or host gives you the exact value to use. A domain should have only one SPF record.
- **DKIM** is a TXT record that holds the public key used to verify your signature. Turn it on in your mail provider's panel and copy the record they show.
- **DMARC** tells receivers what to do when the first two fail. Start with a monitoring policy, `v=DMARC1; p=none` , then tighten it once reports look clean.

After changing DNS records, allow a few hours for them to take effect before testing again.

## Step 5: Check the other usual suspects

- The mailbox is full, or the sending address doesn't exist.
- Your host blocks outgoing mail on its default port, so use the SMTP port it documents.
- A plugin conflict stops form emails. Deactivate recently added plugins and retest.
- Gmail or Outlook is filtering you. Mark one message "not spam" and add a rule for your own sender address.

## Step 6: Keep a safety net

Even with everything correct, send important notifications to two places: your business mailbox and a second address. If one fails, you still see the enquiry. I do this for my own enquiry form.

## Related reading

- [What should actually be in a WordPress maintenance retainer](https://rajangupta.com/what-should-actually-be-in-a-wordpress-maintenance-retainer/)
- [How to secure the WordPress login page](https://rajangupta.com/how-to-secure-wordpress-login-page-complete-guide/)

## Want it checked for you?

Run your domain through the [free audit tool](https://rajangupta.com/wordpress-audit-tool/) to see the basics, then [send me your site address](https://rajangupta.com/contact-us/) and I'll tell you which of these steps your setup needs. A day of lost enquiries costs more than the fix.

🎁 Free download

Get the free WordPress Security Checklist 2026

25-point checklist PDF - malware detection, hardening guide, login security.

- ✓ 25-point security checklist PDF
- ✓ WordPress malware scan guide
- ✓ Hardening checklist for any WordPress site

No spam. Unsubscribe any time.

🎉

You're in!

Check your inbox - the checklist PDF is on its way.

Need help with your WordPress site?

I'm a [freelance WordPress developer](https://rajangupta.com/) who fixes exactly this kind of problem.

150+ projects. Clients in UK, US, UAE & Ireland. Fast turnaround.

[Hire me](https://rajangupta.com/contact-us/) [Book a free call](https://cal.com/rajangupta/discovery?user=rajangupta&overlayCalendar=true)

![Rajan Gupta](https://rajangupta.com/wp-content/uploads/2026/01/freelance-wordpress-developer-rajan-gupta-150x150.webp)

Rajan Gupta

Freelance WordPress Developer

I'm Rajan Gupta, a freelance WordPress developer based in India with 150+ projects delivered for agencies and businesses in the UK, US, UAE, and Ireland. I specialise in performance optimisation, Core Web Vitals, custom Sage/ACF builds, and WooCommerce development. I target 90+ mobile PageSpeed where technically achievable, with a before-and-after report.

### Related Articles

- [WordPress Stuck in Maintenance Mode: Fix "Briefly Unavailable for Scheduled Maintenance"](https://rajangupta.com/wordpress-stuck-in-maintenance-mode-fix-briefly-unavailable-for-scheduled-maintenance/)
- [Error Establishing a Database Connection in WordPress: 7 Fixes That Work](https://rajangupta.com/error-establishing-a-database-connection-in-wordpress-7-fixes-that-work/)
- [UCP for WooCommerce: How I Made Two Delhi Cake Shops Ready for AI Shopping Agents](https://rajangupta.com/ucp-woocommerce-universal-commerce-protocol/)
- [WordPress White Screen of Death and Critical Error: How to Fix It (Step by Step)](https://rajangupta.com/wordpress-white-screen-of-death-and-critical-error-how-to-fix-it-step-by-step/)
- [How AI Search (ChatGPT, Google AI) Reads Your Website, and What to Fix](https://rajangupta.com/how-ai-search-reads-your-website/)
- [How to Hire a WordPress Developer in 2026: Questions, Red Flags and Costs](https://rajangupta.com/how-to-hire-a-wordpress-developer-2026-questions-red-flags-and-costs/)

Need a WordPress fix?

### I fix exactly this kind of problem.

150+ projects. 4.7★ on Google. Clients in UK, US & UAE. Fast turnaround.

- ✔ Performance-focused builds
- ✔ Clean UI + strong UX
- ✔ SEO-ready structure

[Book a free call](https://cal.com/rajangupta/discovery?user=rajangupta&overlayCalendar=true) [Work with me](https://rajangupta.com/contact-us/)

No spam. No pressure.

#### Free Security Checklist PDF

25 hardening steps. Takes 5 minutes to run.

No spam. Unsubscribe any time.

✓ You're in!

First tip coming soon.

Security tool

### Check your WordPress site

Scan for malware, risky code, and security issues in seconds.

- ✔ Malware detection
- ✔ Security checks

[Visit WP Scan](https://wp-scan.org/) [Run Malware Check](https://wp-scan.org/malware-check)

---

Site index for AI agents: https://rajangupta.com/llms.txt
Contact: https://rajangupta.com/contact-us/


<!-- Page cached by LiteSpeed Cache 7.9.4 on 2026-12-03 15:31:22 -->
<!-- Guest Mode -->