WordPress Mail Not Delivered to the Same Domain — How I Fixed It
The Problem
A client reported that emails from Contact Form 7 on their site weren’t arriving.
When submitting the form, they’d see “Failed to send your message.” Standard WordPress emails (like user registration notifications) were working fine — only CF7 was broken.
Setup
The site’s configuration:
- Web server: Sakura Internet
- Email: Google Workspace (previously using Sakura’s mail)
The key detail is that they had previously used Sakura’s built-in email. Even after migrating to Google Workspace, their domain was still listed as “mail-enabled” in Sakura’s control panel.
Diagnosing the Cause
Step 1: First Error — status: 'spam'
Checking the CF7 API response in the browser’s developer tools showed status: 'spam'.
It looked like reCAPTCHA v3 was flagging submissions as spam, so I temporarily removed reCAPTCHA from CF7’s integration settings. That cleared the spam flag.
Step 2: Next Error — status: 'mail_failed'
Removing reCAPTCHA revealed the next error: status: 'mail_failed'. The mail sending itself was failing.
WordPress’s standard mail functionality (password resets, etc.) was still working. CF7’s settings looked correct.
Step 3: The Real Cause — Same-Domain Mail Routing
Changing the recipient to a different domain (e.g., xxx@example.jp) worked fine.
So only mail to the same domain was failing.
The cause was Sakura Internet’s mail configuration. When Sakura’s server sends mail to xxx@example.com, instead of routing it externally to Google Workspace, it tries to deliver it locally within Sakura’s infrastructure — and fails — because that domain is still listed as “mail-enabled” in the control panel.
The Root Fix vs. the Practical Reality
In theory, disabling the mail feature for this domain in Sakura’s control panel would solve it at the root.
But in this case, checking the mail usage in the control panel showed a fair amount of stored mail. There appeared to be forwarding rules set up, but I couldn’t tell the full picture, and I was worried that touching anything might break something.
So instead, I went with a workaround: WP Mail SMTP by WPForms to send via external SMTP, leaving the Sakura mail config untouched.
“Why not just use WP Mail SMTP from the start?” is a fair question, but if the default PHP mail works, that’s simpler. Setting up external SMTP involves two-factor auth, app passwords, and a handful of steps — responding when there’s a problem is good enough.
The Fix: WP Mail SMTP by WPForms + Google Workspace
1. Decide on a Google Workspace Sending Address
Pick the email address to use as the sender.
2. Enable 2-Factor Authentication → Generate an App Password
From the Google account’s Security settings:
- Enable 2-step verification (if not already done)
- Go to App passwords
- Enter an app name (something like “WordPress”)
- Copy the generated 16-character password (remove any spaces)
3. Configure WP Mail SMTP by WPForms
Install the WP Mail SMTP by WPForms plugin in WordPress and configure it:
| Setting | Value |
|---|---|
| SMTP Host | smtp.gmail.com |
| Encryption | SSL |
| SMTP Port | 465 |
| Authentication | On |
| SMTP Username | Google Workspace email address |
| SMTP Password | App password (no spaces) |
4. Set the From Email Address
Set the “From Email” to the same address as the SMTP username. Using a different address may cause send failures.
5. Send a Test Email
Use WP Mail SMTP by WPForms’ “Tools → Email Test” to run a test. Send to the same domain — if it arrives, you’re done.
Summary
- On Sakura Internet with Google Workspace email: if the domain is still “mail-enabled” in the control panel, same-domain mail gets delivered locally and fails
- The root fix is disabling the mail feature in the control panel, but be careful if existing mail or forwarding rules are in place
- The safe workaround is WP Mail SMTP by WPForms with Google Workspace as the SMTP relay — resolves the issue without touching Sakura’s mail configuration
This is a fairly common scenario when running Web on Sakura with email hosted elsewhere. If CF7 mail isn’t arriving, this is the first thing to check.