FormHaven

Send an HTML form to your email

Change one line, the form's action, and every message arrives in your inbox. Press Reply and you answer the visitor. Spam is filtered out before it reaches you.

14 days free, no card. Paste the address where the code says YOUR_FORM_ID.

contact.html
<form action="https://formhaven.net/f/YOUR_FORM_ID" method="POST">
  <label>Your email <input type="email" name="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <input type="hidden" name="_subject" value="New message from your website">
  <input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>

Set it up

  1. 1

    Create a form in FormHaven

    Sign up, press New form and copy its address. It looks like https://formhaven.net/f/YOUR_FORM_ID.

  2. 2

    Put it in the action

    Paste the address into your form's action and keep method="POST". Give every input a name: the email shows each answer under that name.

  3. 3

    Send a test

    Open your page, fill in the form and press Send. The message lands in your inbox, and the visitor sees a thank-you page.

  4. 4

    Answer it

    Press Reply in the email. It goes to the address the visitor typed in the email field.

Send it with JavaScript instead

Add this after the form and the visitor stays on your page: the form is swapped for a thank-you line once the message is in. With JavaScript off, the form still posts the normal way.

contact.html
<script>
  const form = document.querySelector('form');
  form.addEventListener('submit', async (event) => {
    event.preventDefault();
    const response = await fetch(form.action, {
      method: 'POST',
      headers: { Accept: 'application/json' },
      body: new FormData(form),
    });
    const result = await response.json();
    if (result.ok) form.replaceWith('Thanks, your message is on its way.');
    else alert(result.message);
  });
</script>

Send each message to your client as well

Add up to 5 more addresses in the dashboard, or with one call to the API. Each address confirms by a link first. Their copy shows your sender name and carries no FormHaven branding.

Terminal
curl -X POST https://formhaven.net/api/v1/forms/YOUR_FORM_ID/recipients \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'

Questions about this setup

Can't I use action="mailto:" instead?
A mailto: form sends nothing itself. The browser opens the visitor's own mail app with the answers filled in, and the visitor still has to press Send there.
Do I need PHP or a server?
No. An HTML form sends its fields to the address in its action, and something at that address has to turn them into an email. FormHaven is that address, so your site can stay plain HTML on any host.
Can I set the subject line?
Yes. A hidden input named _subject sets it, as in the code above. Without one, the subject is "New submission:" and your form's name.
What stops spam?
People never see the hidden _gotcha field, so a message that fills it in goes to a separate spam list and is never emailed. You can also list your own domains, add spam words, or turn on an invisible bot check.
Where are the messages kept?
On our servers in the EU, for as many days as you set per form (1 to 365), or not at all. A data processing agreement covers every account.

More to read

Get your form address in a minute

14 days on Agency limits. No card.

Start your 14-day trial