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
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
Want it checked for you?
Run your domain through the free audit tool to see the basics, then send me your site address and I'll tell you which of these steps your setup needs. A day of lost enquiries costs more than the fix.
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 who fixes exactly this kind of problem.
150+ projects. Clients in UK, US, UAE & Ireland. Fast turnaround.

Rajan Gupta
Freelance WordPress DeveloperI'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.