Get an endpoint Sign in

Guides Plain HTML

A working HTML contact form, with no backend

An HTML form can’t send email by itself: it needs somewhere to post to. Point it at sendm8 and every submission lands in your inbox, with spam filtered out. No server, no PHP and no JavaScript required.

The form

Paste this into any page and change you@example.com to your own address. That’s the whole setup.

contact.html
<form action="https://sendm8.com/f/you@example.com" method="POST">
  <label>Your email <input name="email" type="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <!-- Honeypot: people never see it, bots fill it in -->
  <input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
  <button>Send</button>
</form>

Every field with a name is delivered under that name, so add phone numbers, dropdowns or checkboxes the same way. Keep your own CSS: sendm8 never touches your page.

What happens when someone submits

  1. The first time anyone submits, sendm8 stores the message and emails you@example.com (well, your address) one confirmation link. Click it and that message, plus anything that arrived meanwhile, is delivered. After that, submissions just arrive.
  2. The visitor is sent to a plain thank-you page with a link back to your site. To send them to your own page instead, add a hidden _next field (below).
  3. You get an email for each submission. Hitting reply answers whoever wrote in, because their email field becomes the Reply-To.

Your own thank-you page

Add a hidden field with the full address of a page on the same site. sendm8 answers the post with a redirect there, so refreshing never sends the form twice.

contact.html
<input type="hidden" name="_next" value="https://yoursite.com/thanks.html">
<input type="hidden" name="_subject" value="New message from yoursite.com">

_subject sets the subject line of the email you get. Both fields are removed before the submission is stored. To redirect to a different domain, sign in and add it to the form’s allowed domains first; that stops anyone using your form as an open redirect.

Staying on the page

If you’d rather show a message without leaving the page, add the helper script and a data-sendm8 attribute. It sends the form in the background and swaps in your message. With JavaScript off, the form still posts normally.

contact.html
<script src="https://sendm8.com/s/v1.js" defer></script>
<form action="https://sendm8.com/f/you@example.com" method="POST"
      data-sendm8 data-sendm8-success="Thanks! I’ll get back to you soon.">

Spam

The hidden _gotcha field catches the simplest bots. Behind it, every submission is rate-limited (10 a minute per visitor), scored for links, known spam phrases and gibberish, and checked by a small AI model. Spam goes to a folder you can review instead of your inbox.

A no-account endpoint keeps up to 100 submissions a month and delivers by email. Sign in with the same address and the form moves into your account: 1,000 submissions a month, a dashboard inbox with search and CSV export, and Discord, Slack, Telegram or webhook delivery.

Questions

Can an HTML form send an email without a server?
Not on its own. The browser can only post the form somewhere. A form backend such as sendm8 receives the post and emails it to you, so you don’t need a server or PHP.
Why not use mailto: as the form action?
A mailto: action opens the visitor’s email app instead of sending anything, and does nothing for people without one set up. Posting to a form backend works in every browser and needs nothing from the visitor.
Does the form need JavaScript?
No. A normal form post works with JavaScript turned off. The helper script is optional and only changes what the visitor sees after sending.