Skip the api/ folder entirely
The standard Vercel recipe is a serverless function plus an email SDK and its API key in your environment variables. A form action replaces all of it. Nothing to write, deploy, or rotate.
integrations · hosting platform
Vercel doesn't ship a built-in form product, so the usual advice is to write a serverless function and wire it to an email API. You can skip all of that: point a plain HTML form at your mailcontact endpoint and submissions land in your project's inbox, with a notification in Discord, Slack, email, or a webhook.
Because it's just a form action, it works with anything you deploy to Vercel: Next.js, Astro, SvelteKit, or a folder of static HTML. Your pages stay static or ISR, there's no function to invoke on submit, and no email provider account to create.
the snippet
Point the form at your project's mailcontact endpoint. Submissions land in your project inbox. No server, no API route, no email service to wire up.
<form action="https://mailcontact.app/api/forms/your-form-id" method="POST">
<input type="text" name="name" placeholder="Your name" />
<input type="email" name="email" placeholder="you@email.com" required />
<textarea name="message" placeholder="What's on your mind?" required></textarea>
<button type="submit">Send</button>
</form>how it works
One inbox per project. Name it after your deployment and you get a form endpoint and a project email address immediately.
Paste the form into whatever you deploy to Vercel: a static page, a Next.js component, an Astro template. Push, and Vercel ships it like any other change.
Add a Discord, Slack, email, or webhook channel. Every submission pings you where you already are.
why mailcontact
The standard Vercel recipe is a serverless function plus an email SDK and its API key in your environment variables. A form action replaces all of it. Nothing to write, deploy, or rotate.
Submissions post to mailcontact's servers, not your deployment. Contact traffic never counts against your function invocations, and there's no cold start between a visitor and their message.
The endpoint accepts posts from any origin, so the same form works on *.vercel.app preview URLs and your production domain. No per-environment config or env vars.
faq
No. At the time of writing Vercel has no forms product, so the common answer is a serverless function plus an email API. With mailcontact the form posts straight to your project inbox instead, and your site stays static.
Yes. The endpoint accepts cross-origin posts from any URL, so the same snippet works on preview URLs, your production domain, and localhost during development.
Submit the same fields with a few lines of fetch in a submit handler and render an inline thank-you. A configurable redirect for native form posts is coming with the launch.
The endpoint rate-limits to 20 requests per minute per IP with a 64KB max body (generous for a contact form), and it protects your inbox from basic flooding.
related
Forms and a real email address, together, with notifications where you live. Launching soon. Be the first to know.