# Fix a WordPress contact form that isn't sending email

WordPress forms send email through your web host, so messages often go missing or land in spam. Post the form to Nisuform instead, and every submission is saved and emailed to you without an SMTP plugin.

Updated Oct 29, 2026.

Contact Form 7, WPForms, Elementor and most other WordPress form tools hand each message to `wp_mail()`. Unless an SMTP plugin replaces it, `wp_mail()` sends through your host's PHP `mail()` function, and that is where messages get lost.

Many hosts limit or block PHP mail to stop spam. When it does go out, the email claims to come from your domain but leaves from a shared server your SPF and DKIM records don't cover, so Gmail and Outlook file it as spam or reject it. Most free form plugins don't store the message either, so a failed email means a lost lead. In Contact Form 7 you'll see "There was an error trying to send your message." Other plugins say thank you and the email never shows up.

## Two ways to fix it

The usual fix is an SMTP plugin connected to a mail provider like SendGrid or Mailgun. You verify your domain, add DNS records and keep both plugins updated. Do that if WordPress sends other email you care about, like WooCommerce receipts and password resets.

If the contact form is the problem, you can take WordPress out of the email path. Paste a Nisuform form into a **Custom HTML** block and the form posts to Nisuform, which saves the submission, filters spam and sends the notification itself. There's no plugin to install, and nothing breaks when you move hosts.

|                  | SMTP plugin                                         | Nisuform form                                                  |
| ---------------- | --------------------------------------------------- | -------------------------------------------------------------- |
| Install          | An SMTP plugin, plus a form plugin                  | A Custom HTML block                                            |
| Email setup      | Mail provider account, verified domain, DNS records | None                                                           |
| Submissions kept | Only if the form plugin stores them                 | All of them, searchable, with CSV export                       |
| Spam filtering   | Whatever the form plugin has                        | Honeypot, fill-time check, rate limits, Turnstile or reCAPTCHA |

## Add the form

### Create and style a form

[Create a contact form](https://app.nisuform.com) in Nisuform. Add any fields you need in the form builder and pick a theme and accent color close to your site's.

### Copy the embed code

On the form's **Setup** tab, choose **Site builder**, then **WordPress**, then **Copy the embed code**.

### Paste it into a Custom HTML block

Edit your contact page, add a **Custom HTML** block where the form goes, paste the code and update the page. In the Classic Editor, paste it into the **Text** tab.

### Send a test

Open the page, wait two seconds and send. The message should be in your Nisuform inbox and your email within seconds.



## Plain HTML instead

To style the form with your theme's CSS, use plain markup instead of the styled embed. It posts without JavaScript, so it also works where scripts get stripped.

```html title="Custom HTML block"
<form action="https://api.nisuform.com/s/YOUR_FORM_KEY" method="POST">
  <label for="name">Name</label>
  <input id="name" type="text" name="name" autocomplete="name" required>
  <label for="email">Email</label>
  <input id="email" type="email" name="email" autocomplete="email" required>
  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5" required></textarea>
  <input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none">
  <button type="submit">Send</button>
</form>
```

After submitting, visitors see a Nisuform thank-you page with a link back to your site. On Pro, a [redirect](/docs/forms/after-submit) sends them to your own page instead.

If you're replacing Contact Form 7, the [Contact Form 7 comparison](/vs/contact-form-7) shows how its form tags map to plain HTML with the same field names.

## When WordPress strips the script

WordPress removes `<script>` tags for anyone without the `unfiltered_html` capability. On a single site, Authors and Contributors don't have it. On a multisite network, only super admins do. Some security plugins strip scripts too. The styled embed still posts as a normal form when that happens, and visitors see the thank-you page instead of the success message in place. Paste the code as an administrator, or use the plain HTML version.

## Page builders

The same embed code works in any builder's raw HTML element: the free **HTML** widget in Elementor (see the [Elementor page](/form-backend/elementor)), the **Code** module in Divi, the **HTML** module in Beaver Builder, and the **Custom HTML** block in block themes, including templates and template parts.

## Spam

Every submission goes through a honeypot, a fill-time check, rate limits, and link and duplicate checks. There's nothing to configure and no CAPTCHA plugin. Spam lands in its own folder, doesn't notify you and doesn't count toward your monthly limit. If spam still gets through, turn on [Cloudflare Turnstile](/docs/protection/turnstile), and add your domain to the form's [allowed websites](/docs/protection/access-rules) so other sites can't post to it.

## Guides

- [Add a form to WordPress without a plugin](https://nisuform.com/docs/site-builders/wordpress)
- [How spam filtering works](https://nisuform.com/docs/protection/spam)
- [HTML forms](https://nisuform.com/docs/connect/html)

## Frequently asked questions

### Why is my WordPress contact form not sending email?

Most form plugins send through wp_mail, which uses your web host's PHP mail function unless something replaces it. Many hosts limit or block it, and mail from a server your domain doesn't authorize lands in spam or is rejected. The form shows success and the email never arrives. Send through an authenticated mail service instead, either with an SMTP plugin or by posting the form to a form backend that sends the email for you.

### Do I need an SMTP plugin?

Only if WordPress sends the email. With a form backend, the form posts to the endpoint and the notification comes from its mail service, so wp_mail isn't involved.

### Can I keep Contact Form 7?

Contact Form 7 always submits to your own site, so it can't post to an endpoint. Replace its shortcode with the embed code in a Custom HTML block. Use the same field names if you like, and every named field is saved.

### Will it slow down my site?

The embed is a few kilobytes of HTML, CSS and JavaScript on the page that has the form. Some form plugins load their scripts on every page.

### Does it work on WordPress.com?

It depends on your plan. WordPress.com plans that don't allow custom code can strip forms and scripts from Custom HTML blocks. Self-hosted WordPress has no such limit for administrators.

### Can I see a submission if the email goes missing?

Yes. Every submission is saved to your Nisuform inbox, with search and CSV export, whether or not the email reached you.
