How to send an HTML form to your email
August 31, 2026
HTML can build a beautiful form interface, but it cannot send an email on its own. Browsers cannot speak SMTP directly, and there is no native attribute like action="email:[email protected]".
To receive customer inquiries, an HTML form needs a server endpoint to receive the POST request. But building that backend yourself usually leads to unexpected maintenance headaches.
The common DIY mistakes (and why they lose leads)
1. Relying on mailto: links
The oldest workaround is setting a form's action to mailto:[email protected]. This triggers the visitor's local mail application. If your visitor is using a work laptop, a phone, or a browser with webmail (like Gmail), clicking submit usually results in a blank, unconfigured email compose window—or nothing at all. The visitor gives up, and you lose the inquiry.
2. Sending emails from client-side JavaScript
Services that let you send email directly from client JavaScript force you to bundle API tokens into your public source code. Malicious actors can scrape your keys, exhaust your API limits, or abuse your credentials to send spam.
3. Rolling your own serverless function or PHP script
Setting up a custom Lambda function, Node script, or PHP mail() handler seems simple until deliverability issues begin. Without dedicated IP warming, SPF, DKIM, and DMARC alignment, mail providers like Google and Outlook will quietly route your notifications into the spam folder. When an SMTP token expires or a server times out, inquiries vanish with no backup.
The reliable solution: Point your HTML to an endpoint
The cleanest, most durable way to connect an HTML form to your inbox is with a zero-maintenance form backend:
- Sign up for a free NormForms account to get your private endpoint URL.
-
Point your form's
actionattribute to that URL:
<form action="https://normforms.com/f/YOUR_TOKEN" method="POST"> <label for="nf-name">Name</label> <input id="nf-name" type="text" name="name" autocomplete="name" required> <label for="nf-email">Email</label> <input id="nf-email" type="email" name="email" autocomplete="email" required> <label for="nf-message">Message</label> <textarea id="nf-message" name="message" required></textarea> <!-- Invisible honeypot traps spam bots silently --> <input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off"> <button type="submit">Send Inquiry</button> </form>
How NormForms protects your incoming leads
-
Any custom field is delivered: Add
name="budget",name="company", orname="phone". All fields are formatted cleanly in your notification email with no extra setup. -
Instant direct reply: Notification emails have the
Reply-Toheader set to the prospect's email address. Hit reply in your email client to respond immediately. - Fail-safe dashboard archive: Every submission is saved to our secure database before dispatching an email. If your email provider experiences downtime, your inquiry is safely preserved in your dashboard.
- Invisible spam protection: Automated bots are filtered using layered honeypots, domain origin locking, and rate limiting without requiring real customers to click blurry crosswalks.
Test before you deploy
Submissions from localhost are automatically recognized as test submissions: delivered with a [Test] prefix and consuming 0 quota. When you deploy your site, set your domain under form settings to block unauthorized third-party submissions.