📝 The Form Submits Successfully – The Email Never Arrives
A contact form worked reliably for months, and right after migrating to a new host, submissions still show a ‘Message sent!’ success message – but the emails themselves stop arriving. Nothing about the form’s code or settings changed; the new server environment did.
🐞 The Problem
Form shows: "Thank you! Your message has been sent." Inbox: nothing arrives, not even in spam, for any submission since the migration completed.
🔍 Why This Happens
Most WordPress contact form plugins send email through PHP's built-in mail() function by default, which hands off delivery to whatever local mail transport agent the SERVER provides - and many hosts either don't configure one at all, or configure it in a way that gets flagged and silently dropped by receiving mail servers (missing SPF/DKIM records for the new server's IP, no relay configured). The form itself has no way to know the send failed, so it shows success regardless.
✅ The Fix: Switch From PHP mail() to a Proper SMTP/Email API
- Install an SMTP plugin (WP Mail SMTP or similar) and configure it to send through an actual authenticated email service (Gmail, SendGrid, Mailgun, your domain registrar’s email) instead of relying on the server’s raw mail() function.
- Use that same plugin’s built-in test-email feature to confirm delivery works BEFORE assuming the contact form itself is fixed — this isolates whether the problem is the form or the underlying mail transport.
- Confirm SPF and DKIM DNS records for your sending domain are correctly set for the new host/email service — missing or outdated records are the single most common reason legitimate mail gets silently dropped rather than landing in spam where at least you’d notice it.
⚠️ Why ‘It Says Sent’ Isn’t Proof of Delivery
- A contact form’s success message only confirms the PHP script finished running without throwing an error – mail() itself returns ‘true’ the moment it hands the message off locally, regardless of whether it ever actually reaches the recipient’s inbox.
- Check the new host’s control panel for any outbound email logs or limits – some hosts silently rate-limit or block mail() entirely as a spam-prevention default, precisely the kind of change that wouldn’t have existed on the old host.
A ‘message sent’ confirmation only ever proved your form ran — delivery was always a separate promise, made by a mail server your migration just quietly swapped out from under you.
