To email form submissions without your own backend, POST to a hosted form endpoint (Formspree, MuxForms, Web3Forms) or load an embed script that submits for you. You get email plus—on most paid backends—a searchable inbox instead of only SMTP.
Guide
Point your form at a hosted endpoint or embed script so submissions become email and inbox rows—no Node, PHP mail, or API route in your project.
| Pattern | You write |
|---|---|
| HTML action URL | `<form action="https://…/submit">` |
| Embed script | div + embed.js (schema from dashboard) |
| fetch from browser | Allowlisted origin + submit token |
| Server Action / proxy | Server holds ingest secret—no browser CORS |
“Just email me when someone fills out the form” is the most common request in web development—and the most repeated backend nobody wanted to maintain. You can send an HTML form to email without writing Node, PHP, or Python in your repo. You do it by pointing the form at a hosted form endpoint or by loading a vendor embed that POSTs on your behalf.
This pillar guide walks through the patterns, tradeoffs, and failure modes (spam, deliverability, no archive) so you pick the right tool—not only the shortest tutorial snippet.
action to a hosted URLThe classic static-site approach:
<form action="https://www.muxforms.com/api/v1/forms/FORM_UUID/submit" method="POST">
<input type="email" name="email" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>
Replace the URL with your vendor (Formspree, Web3Forms, etc.). Field names must match what the backend expects.
Pros: Zero JavaScript, works on the oldest hosts.
Cons: Browser navigation on submit unless you use AJAX; CORS if you switch to fetch later; limited UX for validation.
For MuxForms, most teams use embed.js instead of raw action URLs so validation and tokens are handled—see Next.js tutorial.
<div data-form-id="FORM_UUID"></div>
<script src="https://www.muxforms.com/embed.js" defer></script>
The script fetches your field schema, renders inputs, and POSTs with the correct headers. Marketers change fields without redeploying HTML.
Pros: One inbox, spam settings, styling tokens in dashboard.
Cons: Requires allowing your site origin (CORS guide).
WordPress: tutorial without a plugin.
Static hosts: static-site roundup.
fetch from the browserawait fetch("https://www.muxforms.com/api/v1/forms/FORM_UUID/submit", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "a@b.com", message: "Hello", _hp: "" }),
});
You must satisfy CORS and often a submit token from GET /api/v1/forms/{id}. Hand-rolling this is error-prone; embed or server proxy is safer.
Your Next.js app can POST server-side with an ingest secret—no public backend repo for mail, but one server function holds the secret:
await fetch(submitUrl, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-MuxForms-Ingest-Secret": process.env.MUXFORMS_INGEST_SECRET!,
},
body: JSON.stringify(payload),
});
The “backend” is still MuxForms; you only host a thin forwarder. Details in API docs.
| Tool | Setup | Archive |
|---|---|---|
| FormSubmit | Change action URL | Email only |
| EmailJS | JS SDK + template | Sends only |
| Formspree free | Endpoint | 30-day history |
Email-only is fine for hackathon pages. Production marketing sites usually want search and webhooks—compare Formspree alternatives.
Without a backend you outsource SMTP. Good vendors send from verified domains and handle bounces; bad setups land in spam.
WordPress wp_mail() is the cautionary tale—plugins fight hosting blocks. Hosted backends skip PHP mail entirely.
Any public action URL will be discovered. Combine:
Read the dedicated guide: honeypot vs Turnstile vs reCAPTCHA.
https://www.yourdomain.com to allowlist (and localhost for dev).When a free access-key tool covers your volume, use it honestly—see Web3Forms comparison.
MuxForms is the inbox, embed, and JSON API. Start free, or upgrade to Pro or Team.
Upgrade to Pro