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.

Free for 100 submissions a month, no credit card. Updated

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 pluginNisuform form
InstallAn SMTP plugin, plus a form pluginA Custom HTML block
Email setupMail provider account, verified domain, DNS recordsNone
Submissions keptOnly if the form plugin stores themAll of them, searchable, with CSV export
Spam filteringWhatever the form plugin hasHoneypot, fill-time check, rate limits, Turnstile or reCAPTCHA

Add the form

  1. Create and style a form

    Create a contact form in Nisuform. Add any fields you need in the form builder and pick a theme and accent color close to your site's.

  2. Copy the embed code

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

  3. 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.

  4. 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.

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 sends them to your own page instead.

If you're replacing Contact Form 7, the Contact Form 7 comparison 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), 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, and add your domain to the form's allowed websites so other sites can't post to it.

What you get with Nisuform

Free covers 100 submissions a month across 3 forms. Pro is $10 a month for 5,000 submissions and adds the features marked Pro.

  • Spam filtering on every plan

    A honeypot, a fill-time check, rate limits and duplicate checks run on every submission, with optional Cloudflare Turnstile or Google reCAPTCHA. Spam never counts toward your limit.

  • An email for every submission

    You get an email within seconds of each submission. Reply-to is set to the visitor, so you can answer from your mail app.

  • Every submission kept

    Search, star and export to CSV. Submissions stay until you delete them, so a missed email never loses a message.

  • File uploadsPro

    Up to 5 images or PDFs per submission, stored privately and shared through links that expire.

  • Slack, Discord, Sheets and webhooksPro

    Send each submission to Slack, Discord, Telegram or Google Sheets, or anywhere else with signed webhooks, Zapier or Make.

  • Auto-repliesPro

    Send each visitor a confirmation in your own words, from your own sender name.

WordPress guides

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.

Start collecting form submissions

Set up your forms with built-in spam protection in minutes for free.

Jane Smith

jane@smith.design

Live

12.4k

Submissions

24

Forms

0

Spam