Contact form not sending email? How to fix it

Why website contact forms stop delivering emails and how to fix it, from spam filtering and email authentication to server mail settings and API errors.

By the UK Technology Hub teamPublished 4 minute read

The short answer

Contact forms usually fail to deliver email because messages are sent from the web server without proper authentication and get filtered as spam, the sender address doesn't match your domain, SPF, DKIM or DMARC records are missing, the hosting blocks outgoing mail, or an email API key is wrong or expired. Send through an authenticated transactional email service, fix DNS records and log or store every submission as a backup.

Few website problems cost businesses more quietly than a contact form that looks like it works but never delivers. Customers think they've reached you; you never hear from them. Here's how to diagnose and fix it.

Step 1: Confirm the problem

  • Submit a test enquiry and note the time.
  • Check the inbox, spam and junk folders, and any email filtering service.
  • Check whether the form shows a success message or an error.
  • Check form logs or stored entries, if your form tool keeps them.

If submissions are stored but emails don't arrive, the problem is email delivery. If nothing is stored, the form itself may be broken.

Step 2: Check how emails are sent

Many sites send form emails directly from the web server using basic PHP mail functions. This is unreliable: shared servers often have poor sending reputations, and messages lack proper authentication. Modern inbox providers frequently filter or reject them.

Fix: send through an authenticated transactional email service or SMTP provider. Most form plugins and frameworks support this.

Step 3: Check the sender address

Emails should be sent from an address on your own domain, such as website@yourdomain.com, and the visitor's email should go in the reply-to field. Sending "from" the visitor's address, like a Gmail account, fails authentication checks and is often rejected.

Step 4: Set up SPF, DKIM and DMARC

These DNS records prove your emails are genuine:

  • SPF lists services allowed to send for your domain.
  • DKIM adds a cryptographic signature.
  • DMARC tells inboxes how to handle failures and sends reports.

Add the records your email service provides. Our guide to DNS records explains where these go and how to avoid breaking existing email.

Step 5: Check API keys and settings

If your form uses an email API:

  • Check the API key is present in your hosting environment variables and hasn't been revoked or rotated.
  • Check the sending domain is verified with the provider.
  • Check account limits haven't been reached.
  • Look at the provider's logs; they usually show delivered, bounced or rejected messages with reasons.

Never put API keys in front-end code. Send emails from a server or serverless function.

Step 6: Check hosting restrictions

Some hosts block outgoing mail ports or limit sending. If you see connection errors in logs, use an API-based email service or the host's recommended SMTP settings.

Step 7: Check spam protection

Aggressive spam filters, CAPTCHAs or honeypots can block real submissions if misconfigured. Test with a normal browser and realistic input, and review filtering logs.

Step 8: Check the recipient side

If emails are sent but not received, your own email system may be filtering them. Add the sending address to allow lists and check quarantine areas.

Add a safety net

  • Store submissions in a database or CRM as well as emailing them.
  • Show a clear success message only after the server confirms receipt.
  • Send an automatic confirmation to the visitor where appropriate.
  • Monitor delivery with periodic test submissions.

Prevent duplicate and missing submissions

Disable the submit button while sending, use unique submission IDs and handle errors gracefully, so visitors know if they need to try again. Our guide to website forms best practices covers form design in more depth.

Testing delivery properly

Test with several inboxes, such as a company address, a Gmail account and an Outlook account, because filtering differs between providers. Check message headers for authentication results (SPF, DKIM and DMARC pass or fail), which reveal exactly why a message was filtered.

When the form shows success but nothing arrives

This usually means the form submitted but the email step failed silently. Make sure your form handler checks the email service's response and logs failures, rather than showing success regardless.

How we help

Our web development team builds forms that send through authenticated email services, with backups and spam protection. Our maintenance and support team diagnoses delivery problems, and our web app developers connect forms to CRMs and workflows.

Frequently asked questions

Why are my contact form emails going to spam?

Usually because they're sent without proper authentication or from an address that doesn't match your domain. Use an authenticated service with SPF, DKIM and DMARC.

Should the form send from the visitor's email address?

No. Send from your own domain and put the visitor's address in the reply-to field.

How do I know if form emails are being delivered?

Check your email service's logs, store submissions as a backup and send regular test submissions.

This guide is general information, not legal, tax or financial advice, and details such as prices, features and rules can change. Product and company names mentioned are trademarks of their respective owners and are used only to identify those products; UK Technology Hub is not affiliated with or endorsed by them.

Related guides

How to fix the WordPress white screen of death

A calm, step-by-step guide to diagnosing and fixing a blank white WordPress page, from recovery mode and debug logs to plugins, themes and memory limits.

All bug fixes & troubleshooting guides