The App Router renders on the server; 'use client' is the exception you write down. Every route decides for itself whether it is produced at build time, revalidated, or rendered per request. And the framework can take a submission itself, which is what Server Actions are for.
Why Next.js does nothing wrong here
Next.js has two documented ways to accept a POST, and both are one file. In the App Router it is a Route Handler: app/api/contact/route.ts with an exported POST(request: Request) whose signature is the Web Request API. In the Pages Router the same thing is called pages/api/contact.ts and is still maintained. The two routers can live in the same project, which is the documented migration path; a single route just cannot be in both.
Server Actions go a step further. An async function with 'use server', hung on a <form> as its action, gets the FormData handed straight to it. There is no route in between and no JSON body to parse, so there is also nothing for anybody to document. In a Server Component that works without JavaScript too: the submit stays an ordinary form POST that React resolves server-side. In a Client Component a submit that happens before hydration is queued and only runs afterwards.
That is an easy position to be in next to the neighbours in this series. Astro needs an adapter for the same route, and Hugo is gone once the build is done. Your process is running anyway, and Nuxt and SvelteKit sit in exactly the same place.
Where the actual work is
The Server Action takes ten minutes. It reads three fields out of the FormData, checks them, and then the cursor sits at the point where the message has to go somewhere.
nodemailer goes in quickly enough, and the first test message lands in your own inbox, because your mailbox knows you. The second goes to a customer on Microsoft 365 and sits in the junk folder. What follows has nothing to do with the framework any more: SPF, DKIM including key rotation, a DMARC policy that starts at p=none because you have to read the reports first. A domain with no sending history has no reputation, and that builds over weeks of real volume. Then there are bounces, a return path somebody has to read.
The other direction is no cheaper. The Next.js documentation says it itself: treat a Server Action like a public API endpoint. So you need a rate limit. As soon as more than one instance is running, it has to have shared state, because neither instance knows what the other has just let through. Then bot detection, because a freshly published form gets found by scripts working through domain lists.
Then there is the question of where the submissions live, for how long, and who deletes them. You need a retention concept naming a period, and a job that actually enforces it. Access and erasure requests have to be answerable per person, and the whole thing has to be written down somewhere. That list turns up at the latest when somebody checks your data protection paperwork.
None of these points is an afternoon’s work, and together they add up to a side product that ages and has to be maintained without ever becoming part of what you sell. The cleanest split is the one where rendering stays in your app and submissions go to infrastructure that does nothing else.
Wiring it up
The shortest path needs none of that. Put a string in action rather than a function and React passes the attribute through into the HTML untouched - and a form pointing at another domain has never been a special case.
// Server Component, without 'use client' and without an action of your own
export default function Page() {
return (
<main>
<h1>Contact</h1>
<form action="https://api.formdall.de/api/v1/f/kx92m4" method="POST">
<label htmlFor="name">Name</label>
<input id="name" name="name" required />
<label htmlFor="email">Email</label>
<input id="email" name="email" type="email" required />
<label htmlFor="message">Message</label>
<textarea id="message" name="message" rows={6}></textarea>
<button type="submit">Submit</button>
</form>
</main>
);
}The page stays a Server Component, and the form does its job even if the browser executes no JavaScript at all - in every rendering mode, prerendered or per request, and in the Pages Router just the same. The visitor is then redirected to the page you set per form; with no target set, they get the JSON response instead.
The second variant requires the App Router, because Server Actions do not exist in the Pages Router. It is meant for the case where no enquiry should leave your application without you having seen it; there the Server Action does the posting.
'use server';
export async function sendToFormdall(formData: FormData) {
// only the fields you know about; your validation belongs here too
const payload = new FormData();
for (const field of ['name', 'email', 'message']) {
payload.set(field, String(formData.get(field) ?? ''));
}
const response = await fetch('https://api.formdall.de/api/v1/f/kx92m4', {
method: 'POST',
// without this header the endpoint answers with a redirect, which fetch follows silently
headers: { Accept: 'application/json' },
body: payload,
});
if (!response.ok) {
throw new Error(`Formdall: ${response.status}`);
}
// your redirect() to the thank-you page belongs here
}One detail changes with it: because the fetch leaves your server, Formdall sees your server’s IP rather than the sender’s. The per-IP limit and the IP reputation then apply to all your visitors at once, and a domain allowlist on the form has nothing to check, because this call sends no Origin header - for this variant you leave it empty.
Pick one of the two blocks, not both. A <form> has one action, and it holds either the URL or the function. To switch, you import sendToFormdall into page.tsx and replace action and method with action={sendToFormdall}. One header separates the two cases: send Accept: application/json and you get JSON instead of a redirect.
What happens next is your call: a redirect() at the end of the action, or useActionState in a Client Component so the message sits next to the field - for that the function takes the signature (prevState, formData). That hook landed in React 19 and so in Next.js 15; before that it was called useFormState. On a <form>’s action it returns nothing; the thrown error lands in your error.tsx. You still don’t have to type the markup: create_form creates the form together with its field schema, and get_embed returns the code for it.
What you are not building
A submission passes through a chain of checks before it lands in your inbox. They run in a process that isn’t yours, so your bundle and your start-up time never see them, and if you pay per invocation, neither does your bill. If a captcha does become necessary, we default to a self-hosted proof-of-work captcha. It sets no cookies and tracks nobody; the work happens in the sender’s browser rather than on a server in the US. That also keeps a third-party script out of the layout you have just finished freeing from 'use client'.
The rest is the list from further up, already ticked off. When a retention period runs out, a daily job deletes physically; there is no column called deleted_at. Webhooks are the only item on it that touches your code at all: HMAC-signed per form, with SSRF protection against internal targets. We do the signing; verifying the signature belongs in your route handler, before it does anything with the payload. Everything else never touches you: submission contents are stored encrypted, on servers in Germany; inside the application only a daily rotating hash of the sender’s IP remains, and server logs disappear after 14 days; access and erasure under Art. 15 and Art. 17 GDPR are one click per email address, and you can export your whole account as a ZIP.
You could build all of it, and unlike the static neighbours in this series you are not even missing anything for it: the process, the database and the deployment are already there. What would come on top are the things around it, like a deletion job that runs in the weeks when nobody deploys. That leaves you maintaining a second product alongside the one you actually work on. Three forms and 100 submissions a month are free, and you do not have to leave payment details. What stays in your repo is what you picked Next.js for in the first place, plus an action attribute pointing somewhere else.