Sender setup
Why WordPress and WooCommerce emails land in spam, and the SMTP fix
Order confirmations that never arrive, contact form messages that sit in junk and password resets that customers never see all have the same root cause on many small business sites: WordPress sends mail from the web server itself, and that server is not authorised to send as your domain. The fix is to route site mail through a proper sending service and authenticate it.
By Kyle Deligny, Titanos, Brisbane. Last reviewed 1 December 2026. General information, not legal advice.
This page explains what WordPress does by default, using its core source code, what the WooCommerce documentation says about sender addresses and providers, and how to connect the site to a provider so the records on your domain match what actually sends.
What WordPress does by default
Every site email passes through WordPress's wp_mail function. In WordPress core's pluggable.php, wp_mail builds a message with PHPMailer and, unless something intervenes, calls isMail(), which hands the message to the web server's own mail function. If no From address is set, the code defaults to wordpress@ followed by your site's hostname.
The mail therefore leaves from whatever server hosts the site, with an envelope sender and sending address that your domain's SPF record almost certainly does not list, and with no DKIM signature for your domain. A receiver sees a message claiming to be from your business that comes from a shared hosting address, which is exactly what a spoofed message looks like.
Two hooks the plugins use
WordPress exposes filters named wp_mail_from and wp_mail_from_name for changing the sender, and an action named phpmailer_init that fires after PHPMailer is set up and before the message is sent. SMTP plugins use that action to switch PHPMailer from the local mail function to a real SMTP connection with a username and password, or to an API for a provider.
That is why one plugin can fix every sender on the site at once, including contact forms, WooCommerce and membership plugins, provided each of them uses wp_mail. A plugin that sends through its own system, such as a newsletter tool, needs authenticating separately on its own page.
What WooCommerce adds
The WooCommerce email FAQ tells store owners to check the From address under WooCommerce, Settings, Emails. Its warning is specific: a public address such as Gmail or Yahoo in that field is likely to push mail into spam folders or get it blocked, and the fix is a registered address on your own domain.
The same page recommends a dedicated SMTP provider over the server's own mail function, calling it more reliable, and advises checking that your emails carry proper authentication. It links to its own guide for the details and does not list the records itself, so the provider's help page is where the exact SPF and DKIM values come from.
| Job | Where you do it |
|---|---|
| Choose the From address on your domain | WooCommerce, Settings, Emails, and the form plugin's own setting |
| Send through a real provider | An SMTP or API plugin using phpmailer_init, with the provider's credentials |
| Authorise the provider for your domain | DNS records from the provider's own help page |
Choosing the provider
Any provider that publishes domain authentication steps will do. If your business already uses Google Workspace or Microsoft 365 for mailboxes, you can send through those accounts, which keeps one set of records, though your plan's sending limits apply. For order volume that grows, an API provider such as Amazon SES or SendGrid separates shop mail from staff mail so a problem in one does not affect the other.
Whichever you choose, keep the credential out of screenshots and shared tickets, because it can send mail as your business. Rotate it when a developer or contractor finishes work on the site.
Fix WordPress and WooCommerce email
- Send a test from the site to a Gmail address and open Show original to see what currently authenticates.
- Set the From address in WooCommerce and your form plugin to an address on your own domain.
- Choose a provider and read its domain authentication help page.
- Publish the SPF and DKIM records that provider lists, entering host names the way your DNS screen expects.
- Install an SMTP or provider plugin and enter the credentials.
- Send a second test and confirm dkim=pass with your own domain.
- Check that spf shows pass for a domain that aligns with your From address, or that DKIM aligns.
- Place a test order and a test contact form submission.
- Add a DMARC record at p=none if you have none, with a reporting address.
- Review the DMARC reports for any other service sending as the site.
Questions people ask
Is a free Gmail address acceptable as the WooCommerce From address?
WooCommerce's own documentation says a public domain address there is likely to land mail in spam or get it blocked. Use an address on your own domain, and authenticate the service that sends it.
Do I need an SMTP plugin if my host offers email?
Often yes. Host mail may work for a mailbox but WordPress still sends with the server's mail function unless something changes it. A plugin or provider connection makes the route explicit.
Will this fix emails to customers who use Outlook or Gmail?
Authenticated mail is far less likely to be filtered, but no sender controls the final inbox decision. Test with several providers and watch for bounces after the change.
Why do some plugin emails still fail after I fix the main one?
Plugins that bypass wp_mail send through their own route and need their own authentication. Check the headers of each type of message separately, including newsletters and booking confirmations.
Where to from here
The free privacy policy audit reads your published privacy policy against the Australian Privacy Principles and tells you what is missing. Privacy Care keeps your policy and your shopper data practices current for AU$149 a month, with a 3-month minimum. Would it be okay if we showed you what the audit finds? A no is welcome.
Sources
- WordPress core, wp-includes/pluggable.php (wp_mail)
- WooCommerce, email FAQ
- RFC 7208, Sender Policy Framework
- RFC 6376, DKIM signatures
- Australian Signals Directorate, email hardening
General information, not legal advice. Laws and guidance change: check the linked primary sources and ask a qualified adviser about your own situation. Written by Kyle Deligny with AI assistance, last reviewed 1 December 2026. How we write and check: editorial policy.
