Plain HTML
Use a standard form action and a redirect. After someone sends a message, they go straight to your thank-you page. No JavaScript or build step required.
fetch, React, Astro, Next.js
Choose a snippet for fetch, React, Astro, or Next.js. Next.js can send from the server if you prefer. Browser forms work too, and you choose which sites may use your form.
"use server"
export async function submitForm(formData: FormData) {
await fetch("https://postbag.dev/s/fm_8f3kq2", { method: "POST", body: formData })
} "use server"
export async function submitForm(formData: FormData) {
await fetch("https://postbag.dev/s/fm_8f3kq2", { method: "POST", body: formData })
} Keep your options open
Postbag works on Cloudflare Pages, Vercel, GitHub Pages, S3, a VPS, or several at once. If you move hosts, the form keeps the same address.