Formstork

GUIDE

How to send an HTML form to email

You built a contact form in HTML, added an action and a submit button, and nothing arrives in your inbox. That is expected: HTML describes the form, but it has no built-in way to deliver a message to your email. This guide explains what actually sends form data to email, how to write the markup correctly, and how to get delivery working in a few minutes with Formstork.

Why HTML alone cannot send email

HTML only defines fields and a submit button. When the form posts, the browser hands the data to whatever URL sits in the action attribute, and something on the receiving end has to turn that data into an email. The old mailto: trick (action="mailto:you@example.com") just opens the visitor's email client, so most people never actually send, and it breaks on shared computers. To reach your inbox reliably you need code or a service that receives the POST and sends the mail for you.

Three ways to get a form into your inbox

First, run your own server-side script (PHP mail(), Node with Nodemailer, Python with SMTP) that receives the POST and sends through an SMTP provider. Second, use a serverless function (Cloudflare Workers, Vercel, Lambda) if you have no server to maintain. Third, point the form at a hosted form backend that receives the POST and emails you, so you write no server code at all. All three do the same job: accept the submission, then send the email.

Write the HTML form correctly

Set method="POST" and put your handler URL in action. Give every field a name attribute, because that name becomes the key in the submitted data and the label in the email you receive. Mark required inputs with the required attribute and use the right type (type="email" for addresses) so browsers validate before sending. Always include an email field for the visitor so replies have somewhere to go.

Make delivery reliable and block spam

Emails sent from a raw script often land in spam because they lack SPF and DKIM alignment, so send through a real provider or a service that already handles authentication. Set the visitor's address as reply-to (not as the from address) so you can reply straight from your inbox without failing SPF. Add a hidden honeypot field and server-side filtering to stop bots, since any public form will start attracting spam.

Send your HTML form to email with Formstork

Point your form's action at https://api.formstork.com/submit and add a hidden access_key field (a short /f/ACCESS_KEY URL works too). Every submission is emailed to you with the visitor's address set as reply-to, and stored in a searchable, taggable dashboard with CSV and JSON export. Spam filtering, a honeypot, and optional Turnstile, hCaptcha, or reCAPTCHA are built in, plus integrations for Slack, Discord, Notion, Google Sheets, and signed webhooks. The free plan handles 250 submissions a month with no credit card, so you can wire up the form below and test delivery right away.

html
<form action="https://api.formstork.com/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <input type="email" name="email" placeholder="Your email" required>
  <textarea name="message" placeholder="Your message" required></textarea>
  <button type="submit">Send</button>
</form>

Frequently asked questions

Can an HTML form send email without any backend?

No. HTML has no mechanism to send mail on its own. You either add a server-side script, a serverless function, or a hosted form backend that receives the POST and sends the email. The mailto: action only opens the visitor's email app and does not deliver anything by itself.

How do I make replies go to the person who filled out the form?

Set the visitor's email as the reply-to header, not the from address. If you use the visitor's address as from, your mail fails SPF and lands in spam. Formstork sets the submitted email as reply-to automatically, so you just hit reply in your inbox.

Is the free option enough for a small contact form?

Often yes. Formstork's free plan includes email delivery, the dashboard, spam filtering, integrations, and CSV plus JSON export, with 250 submissions a month and 90-day retention, no credit card. If you need more volume, forever retention, autoresponders, or file uploads, the paid plans add those.

Try Formstork free

250 submissions a month with a full dashboard. No credit card required.

Get your access keyRead the docs