Skip to content

Releases: pfstr/serverless-cloudflare-newsletter

v1.2.1 — batch-send fallback

Choose a tag to compare

@pfstr pfstr released this 23 Jul 12:11

A failing sendEmailBatch() no longer sinks the delivery run: the queue drain falls back to per-email sendEmail() within the same run, and delivery errors are logged (visible in wrangler tail) instead of being swallowed. See CHANGELOG.md.

v1.2.0 — localizable emails, UTF-8 fix

Choose a tag to compare

@pfstr pfstr released this 23 Jul 11:25

Fixed: outgoing emails are wrapped in a minimal HTML document with an explicit UTF-8 charset — mail clients no longer garble umlauts and other non-ASCII characters (full <html> documents pass through untouched).

Added: localizable email texts via optional variables — FOOTER_TEXT and UNSUBSCRIBE_LABEL for the compliance footer, CONFIRM_SUBJECT and CONFIRM_HTML (supports {{confirm_url}}) for the double-opt-in confirmation email. Defaults remain English.

Update a deployed copy: see Updating.

v1.1.0 — queued sending: any list size on any plan

Choose a tag to compare

@pfstr pfstr released this 23 Jul 07:47

Campaign sends now go through a background queue instead of one long request:

  • POST /api/send queues and returns immediately; a minutely job delivers SEND_BATCH emails per run (default 40 — sized for the free plan). A 1,000-recipient campaign completes in ~25 minutes on the free plan.
  • Atomic claims (no double-sends), crash recovery after 10 minutes, up to 3 attempts per recipient.
  • Unsubscribing also cancels queued-but-undelivered emails to that address.
  • Optional sendEmailBatch() hook in src/email.ts: one API call for up to ~1,000 emails — with it even the free plan finishes big lists in minutes.

Changed: POST /api/send now returns { ok, queued }; the cron runs every minute (RSS check keeps its 15-minute cadence). Migration 0003 is append-only and applies automatically on your next deploy — see Updating.

v1.0.0 — first stable release

Choose a tag to compare

@pfstr pfstr released this 23 Jul 07:06

First stable release of the serverless newsletter template.

Highlights

  • Signup (hosted + embeddable + JSON API), campaigns via /admin, provider-agnostic sendEmail() adapter
  • Optional double opt-in, Turnstile bot protection, RSS auto-send on a cron trigger
  • Compliance built in: automatic footer with unsubscribe link + postal address (SENDER_ADDRESS), RFC 8058 one-click unsubscribe headers, scanner-proof unsubscribe confirmation, data minimization on opt-out, consent audit trail

Stability promise from this release on

  • sendEmail() / isEmailConfigured() (src/email.ts) and EXTRA_FIELDS (src/fields.ts) are stable API — breaking changes only in a new major version, with an upgrade guide
  • Shipped D1 migrations are never modified, only appended

Updating a deployed copy: see the Updating section in the README. Full details in CHANGELOG.md.