WordPress not sending emails: why it happens and how to fix it with SMTP
TL;DR: WordPress sends mail through PHP's basic mail() function by default. Many hosts restrict it, and even when it works, the messages lack authentication, so Gmail and other providers send them to spam or reject them. The fix is to send through a real mail account or email service over SMTP, with a From address that belongs to your domain and with SPF, DKIM and DMARC set up. Install an SMTP plugin, connect a mailer, send a test, check the headers and fix any authentication that fails.
Why WordPress email fails
Every WordPress email, from password resets and new-user notices to WooCommerce orders and form submissions, goes through a function called wp_mail(). By default it hands the message to PHP's mail() function, which passes it to a mail program on your server.
That default breaks in several common ways:
- PHP mail is disabled by your host to stop abuse, so the message is never sent.
- The message is sent but not authenticated. It carries no proper DKIM signature, and the server's IP may not be covered by your SPF record. Gmail and Outlook treat it as suspicious.
- The From address is wrong. Mail pretending to come from
[email protected]but sent from a server that is not authorised for that domain is rejected or filtered. - The sending IP has a poor reputation or no reverse DNS. Shared servers are often used by many sites.
- The recipient's server rejects it because of missing authentication or content filters.
- A plugin conflict or a bad setting stops the mail from being generated.
- A local development site has no mail server at all.
The result looks the same each time: the form says "sent", but nothing arrives.
First, find out which problem you have
Work through these quick checks.
- Check the spam folder of the recipient, and any quarantine in your mail system. If mail is there, your problem is authentication, not delivery.
- Trigger a known email. Use the password reset on your login page, and watch whether it arrives.
- Look for an error. Enable the debug log in a staging copy or read the host's mail log if available. A message such as "mail function disabled" is clear.
- Check the From address in the plugin that sends the message. Contact forms often use the visitor's address as the sender, which fails authentication checks.
- Check DNS records for your domain. See why business emails go to spam.
If mail arrives in spam, go straight to authentication. If it does not arrive anywhere, SMTP is the fix.
The fix: send through SMTP
SMTP is the standard protocol for sending email. Instead of relying on PHP mail, WordPress logs in to a mail service with a username and password, or an API key, and hands the message over properly. The provider signs it and delivers it from a trusted IP.
Steps:
- Back up your site and, where possible, try this on staging first. See our staging guide.
- Install an SMTP plugin. Popular options include WP Mail SMTP and several free alternatives. Install and activate one.
- Choose a mailer in the plugin settings: your own mailbox, a transactional service or an API-based provider.
- Enter the credentials the provider gives you. Prefer an API connection or an app-specific password over your main account password.
- Set the From email to an address on your own domain, such as
[email protected], and use the plugin's option to force it on all messages. - Set a sensible From name, for example your company name.
- Send a test email from the plugin's tools and confirm it arrives.
- Enable email logging if available, so you can see failures later.
Contact form plugins often set the visitor's address as the From. The better pattern is to send from your own domain and put the visitor's address in the Reply-To header, so you can still reply to them directly.
Choosing a mail service
You have three practical routes.
| Route | Good for | Watch out for |
|---|---|---|
| Your business mailbox (Google Workspace, Microsoft 365, Zoho, hosting email) | Low volume: contact forms, password resets | Sending limits, and policies that restrict app sending |
| Transactional email service (API or SMTP) | Orders, receipts, OTPs, higher volume | Setup of domain authentication, and cost at scale |
| Your own mail server on a VPS | Full control | Reputation, reverse DNS, maintenance. See reverse DNS and PTR records |
For a small site, a business mailbox is the simplest. For a store or any site that sends mail customers depend on, such as order confirmations, a transactional service is more reliable. If you are choosing between mailbox providers, see Google Workspace vs hosting email, and for setup basics read how to set up business email on your own domain. For time-sensitive mail such as login codes, our guide to OTP emails landing in spam covers specific pitfalls.
Set up authentication
An SMTP connection alone does not guarantee inbox delivery. Receiving servers check three DNS-based records:
- SPF lists the servers allowed to send for your domain.
- DKIM signs messages so they cannot be altered undetected. See how to find your DKIM selector and check the record.
- DMARC tells receivers what to do when a message fails SPF and DKIM alignment. Read DMARC without breaking forwarding before tightening it.
Your mail provider will give you the exact records to add. If your SPF record includes many services, watch for the lookup limit, explained in SPF too many DNS lookups.
Since Gmail and other large providers tightened their sender requirements, authentication is no longer optional for bulk senders, and it is good practice for everyone. Our post on Gmail's 2026 spam rules explains the changes.
Testing and reading the result
After sending a test email to a Gmail address:
- Open the message and choose Show original.
- Look for
SPF: PASS,DKIM: PASSandDMARC: PASS. - Check that the
Fromdomain matches the domain in the DKIM signature. - If any fail, correct the DNS record named in the result and test again.
Send a second test to a different provider, such as Outlook or Yahoo, because each filters differently. An email-testing service can give a score and list specific problems.
Plugin-specific problems
- WooCommerce emails missing. Check the email settings for each type of notification, and make sure the From address is on your domain. See our guide on orders stuck on processing if payments also fail to complete.
- Contact form emails missing. Check the form's "To" and "From" fields. Switch the From to your domain and the visitor to Reply-To.
- Password reset emails missing. Often a From address problem or a blocked PHP mail.
- Another plugin overrides the mailer. Only one plugin should control sending. Disable duplicates, and use systematic plugin conflict debugging if needed.
- Caching or security plugins that block the form's request can stop mail from being sent at all.
Hosting limits and blocked ports
Hosts often limit how many emails you can send per hour, and some block outgoing connections on common SMTP ports to stop spam. If your SMTP plugin cannot connect:
- Try the port your provider recommends, usually 587 with TLS, or 465 with SSL.
- Ask your host whether outbound SMTP is allowed, and on which ports.
- Use an API-based mailer that connects over HTTPS, which is rarely blocked.
- Check that your server's firewall allows the connection. For a VPS, see our UFW guide.
Also check the limit on messages per hour, because a newsletter or a spike of form spam can hit it.
A short checklist
- Use an SMTP plugin with a real mailer
- Send from an address on your own domain
- Use Reply-To for visitor addresses
- Add SPF, DKIM and DMARC records for the sending service
- Send and read a test, and confirm all three pass
- Turn on email logging
- Protect forms against spam so you do not burn your sending reputation
- Monitor for failures, not just for the site itself
FAQs
Why is WordPress not sending emails?
Usually because PHP mail is blocked or unauthenticated. Use SMTP with a proper mail service and set up SPF, DKIM and DMARC.
What is the best SMTP plugin for WordPress?
Several are reliable, including WP Mail SMTP and others. The plugin matters less than the mail service and the DNS records behind it.
Why do WordPress emails go to spam?
Because the messages lack authentication or come from an IP with poor reputation. Sending through SMTP with SPF, DKIM and DMARC fixes most cases.
Can I use my Gmail account for WordPress SMTP?
You can, but use an app password or an official connection method, and note the sending limits. For business sites, a domain-based mailbox is better.
What port should I use for SMTP?
Typically 587 with TLS or 465 with SSL. Use the port your provider specifies, and make sure your host does not block it.
Why does the contact form say sent but nothing arrives?
The form handed the message to WordPress, which handed it to PHP mail, which failed or was filtered. Move to SMTP and check the spam folder.
Does changing the From address matter?
Yes. Use an address on your own domain, because mail claiming to be from a domain it is not authorised to send for will fail checks.
How do I know if my emails are authenticated?
Send a test to Gmail, open Show original and check for SPF, DKIM and DMARC passes.
Conclusion
WordPress mail problems come from the default way it sends, not from the plugin that shows "sent". Move to SMTP through a mailbox or transactional service, send from your own domain, add the right DNS records and verify the result in the headers. Once that is done, password resets, form messages and order emails become dependable.
HostCloud's business email and hosting plans help you send mail that reaches the inbox. See https://hostcloud.in.
Sources: