Contact forms

Contact Form 7: “There was an error trying to send your message” — how to fix it

This Contact Form 7 error means WordPress could not hand the email to a mail server. The usual causes are disabled PHP mail, a bad Mail tab setting, or a failing SMTP login. Here is how to fix each.

October 3, 2026 · 6 min read

A visitor submits your Contact Form 7 form and sees a red or orange box: “There was an error trying to send your message. Please try again later.” They usually give up, and you never hear from them.

This is one specific form error. For every reason a contact form fails to deliver, including the silent failures that show no error, see the full guide: Contact form not sending email? Why it happens and how to fix it.

What the error actually means

When the form is submitted, Contact Form 7 builds the email and passes it to WordPress’s wp_mail() function. If wp_mail() reports that it could not send, Contact Form 7 shows this message. So the form itself is fine. The problem is the step where WordPress hands the email to a mail server.

Step 1: fix any warnings on the Mail tab

Open Contact → Contact Forms, edit the form and go to the Mail tab. Contact Form 7 checks your settings and highlights problems there. Common ones:

  • The sender address does not belong to your site’s domain.
  • A mail tag such as [your-email] does not match any field in the form.
  • The “To” field is empty or contains an invalid address.

Fix every warning before moving on. Each one on its own can cause the error.

Step 2: send from your own domain, reply to the visitor

If the From field is [your-name] <[your-email]>, the email claims to come from the visitor. Mail servers see that as forgery. Change it to an address on your domain and add the visitor as Reply-To in Additional headers:

From:  Your Site <[email protected]>
Additional headers:
Reply-To: [your-name] <[your-email]>

Pressing Reply still writes back to the visitor. More detail in why your form must not send from the visitor’s email.

Step 3: check whether WordPress can send any email

Request a password reset for a test user. If that email never arrives either, your server cannot send mail. The usual reasons:

  • The host has disabled PHP mail() or limits how many emails you can send per hour.
  • Outgoing connections on port 25 are blocked, which is common on cloud servers.
  • The server’s mail program is not installed or not running.

The fix is the same for all of them: send through an authenticated mail service instead of the server’s own mail function. See Contact Form 7 with SMTP.

Step 4: if you already use an SMTP plugin

The error then means the SMTP login or connection failed. Check the plugin’s email log or send a test email. Typical causes:

  • A changed password, or a Gmail or Microsoft account that now requires an app password or OAuth.
  • The wrong port or encryption, for example port 465 with TLS selected instead of SSL.
  • The host blocking outgoing connections to the SMTP port.
  • A sending limit on the mail account that has been reached for the day.

Do not change the error text to hide the problem. Visitors will believe their message was sent while you still receive nothing. Install Flamingo so submissions are stored even when sending fails.

Confirm it is fixed

Submit the form yourself with an address you can check. You should see the green “Thank you” message, the email should arrive in your inbox (not spam), and your SMTP or delivery log should show it as delivered. With SecureSMTP every Contact Form 7 email appears in the delivery log with its result, so you can confirm this without guessing.

Frequently asked questions

Is the visitor’s message lost when this error appears?

Unless you store submissions, yes. Contact Form 7 does not save messages on its own. Install the Flamingo plugin so every submission is kept in WordPress even when the email fails.

Will reinstalling Contact Form 7 fix the error?

Almost never. The form is working; the email step after it is failing. Fix how WordPress sends email, or the Mail tab settings, instead.

Can I change the error text?

Yes, under the form’s Messages tab. But changing the text only hides the problem. Visitors still think their message failed, and you still do not receive it.

The error started after my host moved my site. Why?

The new server probably blocks or limits PHP mail, or your SPF record still lists the old server. Sending through an authenticated SMTP service avoids both.

Related reading

Fix email delivery on your site

SecureSMTP delivers WordPress, Shopify, and custom form emails with SPF + DKIM + DMARC alignment. Free tier covers most small sites.