Tutorial
8 min read
April 7, 2026
HTML Form to Email: The Right Way to Handle Contact Form Submissions
Stop relying on DIY mailers and unreliable workarounds. WizeForm is a purpose-built form-to-email pipeline with AI scoring, spam protection, and a submission dashboard built in.
WizeForm Team
Engineering
The approaches that don't work — and why developers keep trying them
The mailto: action on a form tag is one of the most persistent misconceptions in web development. When a user submits a form with mailto: as the action, nothing is sent from the website — the browser opens a local mail client with the form data pre-populated and waits for the user to manually click send. On mobile or in environments without a mail client configured, it does nothing at all.
Rolling your own server-side mailer is the natural next step, and it works — until it doesn't. You're responsible for SMTP credential management, delivery configuration, bounce handling, and ongoing maintenance to avoid landing on spam blacklists. None of that has anything to do with your actual project. And when it breaks at 2am because an email provider changed an API, it's your problem to fix.
WizeForm replaces both approaches with a purpose-built pipeline. Your HTML form POSTs to WizeForm's endpoint. WizeForm validates the submission, processes it with AI, and delivers a formatted notification to your inbox. The email infrastructure, the delivery, the spam handling, and the scoring all live inside WizeForm. You configure none of it.
Setting up a reliable form-to-email pipeline with WizeForm
After creating your WizeForm account, the setup is three lines of HTML. Set your form's action to https://wizeform.com/api/submit, set the method to POST, and add a hidden input with your access key. WizeForm sends submissions to the email address you registered with by default. You can update the notification address in your dashboard settings.
Every notification WizeForm sends includes the AI score in the subject line — so you see Hot, Warm, or Cold before you open the email — followed by the two-sentence AI summary in the preview text, and the complete form data in the body. This is a fundamentally more useful notification than a raw field dump, because it gives you the context you need to respond appropriately right away.
If you have multiple forms on multiple pages, each can share the same WizeForm access key or use separate keys for dedicated dashboard views. WizeForm accepts any field names you choose — name, email, company, message, budget, phone — and includes all of them in the notification and dashboard record without any schema configuration.
Handling redirects, errors, and JavaScript-driven forms
For a pure HTML form that doesn't use JavaScript, add a hidden input named _redirect with the URL of your thank-you page to send users there after a successful submission. WizeForm issues a redirect after processing, so the user experiences a clean form → confirmation flow without any client-side code.
For React, Next.js, or any JavaScript-driven form, use WizeForm's JSON endpoint instead of setting the form action attribute. Call fetch with method POST and Content-Type: application/json, include your access key in the body alongside the form data, and handle the JSON response in your component. WizeForm returns a 200 with a success message on completion, and standard HTTP error codes with descriptive messages for failure cases.
Rate limit responses return 429, invalid or missing access keys return 401, and malformed request bodies return 400 with a specific message about what's wrong. This gives you everything you need to display meaningful inline feedback to users without guessing at the cause of an error.
Get started free
Try WizeForm today
500 submissions per month, AI lead scoring, and a full dashboard — free forever, no credit card required.
More articles
View allThought Leadership
The Future of Form Backends: AI, Zero Config, and Intelligent Lead Processing
Form backends have forwarded raw submissions by email for over a decade without getting smarter. WizeForm is building toward a future where every submission is automatically understood, scored, and acted on.
6 min read
Best Practices
How to Design a Contact Form That Attracts High-Quality Leads
The fields you put on a contact form directly shape the leads you get back. Here's how to design a form that captures the right signals for WizeForm's AI scoring — without scaring visitors off.
6 min read
Use Cases
WizeForm for Agencies: Manage Client Contact Forms at Scale
One WizeForm account, one access key per client, and individual dashboards for each site. Here's how agencies use WizeForm to handle form processing across dozens of clients without the maintenance overhead.
6 min read