Next.js.
With the App Router a server action is the shortest path: the browser posts to your own server, which forwards to Mailan. That keeps the request out of the browser entirely — useful when a strict CSP is in play.
Server action
The form works without JavaScript, because the action runs on the server. Put the access key in .env.local as MAILAN_KEY.
TSX
Or straight from the browser
Without a server action the client component posts directly. The access key is public by design, so this is safe — it only identifies the form.
TSX