Why Your Website Contact Form Isn't Sending Emails After Changing Your MX Records
Summary
This guide helps you troubleshoot and resolve: Why Your Website Contact Form Isn't Sending Emails After Changing Your MX Records. Follow the steps below to fix the issue.
Common Causes
Changing your MX (Mail Exchange) records tells the internet where to deliver emails for your domain. While this is necessary when switching to a new email provider, it can inadvertently break your website's contact form. This happens because your web server often attempts to send form submissions using your own domain name, but after an MX change, that server may no longer be authorised to handle mail for your domain, resulting in messages being rejected or silently dropped.
Quick Fix Steps
- Identify where your website is hosted and access your hosting control panel.
- Check the email routing settings for your domain.
- Update your SPF record to include your web server's IP address.
- Send a test submission through your contact form to verify delivery.
Detailed Instructions
1. Check Local Email Routing
If your website and email are hosted on the same server, your web server may be trying to deliver emails locally instead of sending them to your external mail provider.
- Log in to your hosting control panel (such as cPanel or Plesk).
- Navigate to the Email or Mail section.
- Select MX Entry or Email Routing.
- Choose your domain from the dropdown menu.
- Set the routing to Remote Mail Exchanger if your emails are hosted elsewhere (e.g., Microsoft 365 or Google Workspace).
- Click Change or Save to apply the setting.
2. Update Your SPF Record
Sender Policy Framework (SPF) records tell receiving mail servers which servers are allowed to send email on behalf of your domain. If your web server is not listed, contact form emails may be marked as spam or rejected.
- Log in to your domain registrar or DNS management portal.
- Locate the DNS management section for your domain.
- Find the existing TXT record that begins with
v=spf1. - Edit the record to include your web server's IP address or hostname. For example, if your web server IP is
203.0.113.5, your record might look like:v=spf1 ip4:203.0.113.5 include:_spf.google.com ~all. - Save the changes and allow time for DNS propagation.
3. Test the Contact Form
- Visit your website and navigate to the contact page.
- Fill out the form using an email address that is not hosted on your domain to avoid caching issues.
- Submit the form and check the receiving inbox.
- If the email does not arrive, check the spam or junk folder.
Troubleshooting
Emails Still Not Arriving
- Propagation delays: DNS changes can take up to 48 hours to propagate globally, though it is usually much faster.
- Incorrect SMTP settings: If your website uses a plugin (such as in WordPress), ensure the SMTP plugin is configured with your email provider's credentials rather than relying on the default PHP mail function.
- DKIM and DMARC: Ensure your DKIM and DMARC records are correctly configured to prevent your emails from being flagged as spoofing attempts.
Contact Form Returns an Error
- Check your website's error logs for "550 Relay access denied" or similar SMTP errors.
- Verify that the "From" address in your form settings matches a valid email account on your domain.
- Ensure your hosting provider has not blocked outbound port 25 or 587.
If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.
Still Having Issues?
💻 Open a Ticket