Everything was running smooth, until one fine day… it wasn’t. You’ve just migrated your WordPress site to a new host. Congrats! But wait — your forms aren’t sending emails anymore. Panic sets in. Leads are getting lost. What’s going on?! Don’t worry — you’re about to hear a very familiar story with a happy (and educational) ending.
TLDR:
After migrating to a new host, Contact Form 7 suddenly stopped sending emails. It turned out the new server didn’t play nice with the default PHP mail function. The solution? Set up SMTP to handle outgoing messages reliably. Everything started working again like magic!
Everything Looked Fine… Until It Wasn’t
Migrating a website isn’t a small feat. You copy files, export the database, update DNS, and within hours, your site is live on a shiny new host.
But soon, trouble strikes. Your Contact Form 7 submissions — the lifeblood of your business — aren’t showing up in your inbox. You start testing… and nothing happens. No delivery errors. And no emails. Just silence.
It’s like sending messages into a black hole.
What Changed?
So what caused this sudden radio silence? Before the migration, things were working perfectly. Then something about the new server setup made Contact Form 7 lose its voice.
Here’s what might have changed:
- PHP mail() function disabled: Some hosts disable it for security or spam prevention.
- Different mail server rules: New host, new filters. Some may block outgoing emails.
- Missing SPF/DKIM settings: Without the right DNS records, emails might be flagged or discarded.
But in many cases, it’s the first one that’s the culprit. And it was in our case too.
The Clue in WordPress Settings
Most WordPress forms (including Contact Form 7) use the mail() function by default. It’s quick and requires no extra configuration — as long as your server supports it.
But if the new host has disabled mail(), those messages never get sent. There’s no “Failed to send” error. They just vanish.
We dug into the logs. Checked email headers. Even set logging options to see if Contact Form 7 was attempting to send. It was — but the server was just ignoring it.
Enter: The SMTP Backup Plan!
SMTP (Simple Mail Transfer Protocol) is a way to send emails through a proper mail server, like Gmail or Outlook. Instead of relying on PHP mail, you authenticate with a known account to send email. It’s reliable and preferred by mail providers.
And in this situation, it was our savior.
By setting up SMTP, we bypassed the sketchy PHP mail altogether.
Here’s how we fixed it:
- Installed an SMTP plugin. Our pick: WP Mail SMTP (because it’s free, popular, and well-supported).
- Went into the settings and entered our email credentials for a Gmail account.
- Enabled ‘Force From Email’ and set the same email used in Contact Form 7.
- Chose ‘Gmail’ as the mailer and authenticated securely using OAuth or App Passwords.
- Sent a test email — and BAM! It worked!
The Forms Were Alive Again
After configuring SMTP, Contact Form 7 finally stopped ghosting us. Emails were flying again. Notifications, confirmations, all of it came through instantly. 🎉
And the best part? It’s more secure and reliable than the old system. SMTP improves deliverability and reduces the chance of emails being marked as spam.
Lessons Learned the Hard Way
This little hiccup taught us a bunch. If you ever face a similar problem, keep these in mind:
- Always test your forms after a migration — don’t assume everything works.
- Check the server’s mail settings before you move your site.
- Install SMTP proactively to avoid issues entirely.
- Use logging plugins like Flamingo or Email Log, so no single form submission disappears unnoticed.
Things We Tried That Didn’t Work (Spoiler Alert)
Before landing on SMTP, we went through a short but comical list of “fixes” that solved nothing:
- Reinstalling Contact Form 7 — Nope.
- Switching themes — Stylish but irrelevant.
- Deactivating other plugins — Like whack-a-mole. Still no joy.
It was all about the mail method. Once we cut PHP mail from the equation, everything clicked.
Still Not Working? Try This Checklist
Okay, so you’ve tried switching to SMTP, and it’s still a no-go? Don’t worry. Here’s a quick checklist:
- Did you enter the correct SMTP server info?
- Is 2FA enabled on your email account? Use an App Password!
- Is the From Email address allowed by the SMTP provider?
- Does your DNS have SPF and DKIM records for that sender domain?
- Are your firewall or security plugins blocking the traffic?
Credentials need to match, and some hosting firewalls might block outgoing SMTP ports. So double-check everything.
SMTP Options You Can Use
Not all SMTP servers are equal. Depending on your budget and needs, you can use:
- Gmail: Free for small use, but limited daily quota.
- SendGrid: Excellent for techies and transactional emails.
- Mailgun: Developer-friendly and free under 5,000 emails/month.
- Outlook / Office 365: Reliable if you use Microsoft products.
- Zoho Mail: Great free option with SMTP support.
Choose what fits your tech skills and volume requirements.
The Happy Ending
In the end, the hosting migration taught us something important. Email is tricky. Servers can be finicky. And assumptions lead to stress.
But with the right tools, you can outsmart the gremlins hiding in the wires.
Thanks to SMTP, our Contact Form 7 submissions now arrive safely, every time. The forms are back in action, and so are we.
The Takeaway
Your site may look perfect after a hosting move… but the invisible stuff like email needs love too.
If you ever find yourself shouting “Why aren’t my emails sending?!” — remember this article. Switch to SMTP and give your forms the reliable mail truck they deserve.
Now go save those submissions!
