Contact forms

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

Seeing "There was an error trying to send your message"? Learn what it means and fix the Mail tab, sender address and SMTP settings. Read the steps.

October 3, 2026 · 6 min read

Want it fixed today? Free for 5,000 emails a month. No card.

Sign up with Google

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 Contact Form 7 error. For every Contact Form 7 email problem, including the silent failures that show no error, see Contact Form 7 not sending email? 8 checks that fix it.

If the message box is yellow and says “One or more fields have an error” instead, the email was never attempted: a field failed validation. That is a different problem, covered in Contact Form 7: “One or more fields have an error”.

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.

Once the error is gone, check where the emails land. Notifications that arrive in Spam have a different cause, explained in Contact Form 7 emails going to spam. If the form uses file uploads, see Contact Form 7 file attachments not arriving.

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

Send Contact Form 7 email from your own domain with SecureSMTP →

Get your contact form emails delivered

SecureSMTP sends your form notifications through an authenticated mail service, DKIM-signed for your own domain, and shows the result of every email in a delivery log.

Free plan: 5,000 emails a month. No card needed. Setup takes a few minutes, plus DNS time for your sending domain.

Send your site’s email through SecureSMTP. Free for 5,000 emails a month. No card needed.