Cloudflare Pages Functions ยท Firebase

SMTP API Backend

Server-managed authentication, verified-domain controls, encrypted SMTP credentials, email delivery, key usage counters, and administrator endpoints.

One send endpoint

POST /api/send/{apikey} resolves the API key to one verified domain and, for Paid/Admin keys, one SMTP account.

Managed authentication

Use POST /api/auth for signup/signin. The function returns an opaque session token; clients do not access Firestore directly.

Server-side secrets

SMTP passwords are encrypted with one AES-256-GCM key stored as a Cloudflare Secret. No secrets are committed to the repository.

Check API health API reference GitHub

Quick request example

POST /api/send/sk_live.{uid}.{keyId}.{secret}
Content-Type: application/json

{
  "to": "customer@example.com",
  "subject": "Welcome",
  "message": "Welcome to our service."
}

See the repository README.md for Firebase setup, Cloudflare variables and secrets, Firestore rules, DNS verification, Bruno instructions, and deployment steps.