Skip to content
FormToMail

Pricing & alternatives

Open-source and self-hosted alternatives to Formspree

By the FormToMail team · Checked against official sources · Updated

You can replace Formspree with your own form handler: a Cloudflare Worker or Pages Function, a Vercel/Netlify function or a small server that validates the POST, checks spam (honeypot, Turnstile), sends an email through a provider's API and stores the submission. It costs little to run but you maintain the spam filtering, email deliverability and storage yourself.

Self-hosting vs a hosted form backend
Self-hosted handlerHosted form backend
SetupWrite a function, set up an email provider and sending domainPaste one URL
SpamYou add honeypot, Turnstile, rate limitsIncluded
DeliverabilityYour SPF/DKIM/DMARCThe provider's
Dashboard / exportBuild it or use a database UIIncluded
CostHosting free tiers + email APIFree tier, then a plan

Minimum a self-hosted handler needs

  1. Accept POST with form-encoded and JSON bodies; answer OPTIONS if you call it with fetch() from another origin (CORS).
  2. Reject a filled honeypot field and verify a Turnstile token server-side.
  3. Rate-limit per IP so nobody turns it into a spam relay.
  4. Send the email through an email API with Reply-To set to the visitor.
  5. Store the submission (Cloudflare D1, Postgres) so a failed email isn't a lost lead.

When it's worth it

Self-host when you already run serverless code and want data in your own database. If you just need the form to work, a hosted endpoint is faster: create one free.

Quick answers

Can I self-host a form backend?

Yes, with a serverless function plus an email API. See Cloudflare Pages forms for the Cloudflare version.

Should I build my own form handler or use a service?

Build it if you want control and will maintain spam filtering; use a service if you want it working today.

How do I send email from a serverless function for a contact form?

Call an email provider's HTTPS API from the function with a server-side key; never put that key in browser code.

What to do next

Rather not maintain it? A FormToMail endpoint does the same job with nothing to host.

Create a free endpoint

Sources

Checked: . Prices, limits and features of other services change: confirm current values at the official links above. Product names belong to their owners; we are not affiliated with them.