Skip to content

Send production mail through Cloudflare - #1966

Merged
neuromechanist merged 1 commit into
devfrom
feature/issue-1895-prod-cf-sending
Oct 26, 2026
Merged

neuromechanist merged 1 commit into
devfrom
feature/issue-1895-prod-cf-sending

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Part of epic #1893, phase 2 (#1895): the production flip.

  • backend/wrangler-sccn.toml: the production vars set EMAIL_PROVIDER = "cloudflare" and EMAIL_FALLBACK = "resend". Account mail and sign-in codes go through the send_email binding (already deployed in 0.10.24, restricted to noreply@ and support@). A refusal for a quota or account-level reason (RESEND_FALLBACK_CODES) is retried once through Resend; every other refusal is final, so a sign-in code is never sent twice. Broadcasts go through the outbox Queue, which backs off on a limit refusal.
  • New backend/test/email-provider-vars.test.ts pins it: both Workers send through Cloudflare with a declared EMAIL binding, and only production falls back.
  • ADR 0110: one sentence updated to say production stayed on Resend until this change.

Staging has sent through Cloudflare since 2026-10-23 (SPF, DKIM and DMARC pass). nemar.org was onboarded for Email Sending on 2026-10-24.

Not affected: the self-hosted secrets manager sends its own mail through Resend SMTP, which stays until Phase 7.

Test plan

  • bun test on the email provider, outbox, broadcast and new config tests (104 pass)
  • typecheck and Biome
  • CI
  • After the 0.10.25 deploy: a production sign-in code arrives with dkim=pass header.d=nemar.org

@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1966

Version: 0.10.25-PR1966.1e3d3dd
Commit: 1e3d3dd


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 4722b20 into dev Oct 26, 2026
20 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-1895-prod-cf-sending branch October 26, 2026 06:38

This branch was previously deployed

1 inactive deployment
npm — 1e3d3dde Deployed Oct 26, 2026 by neuromechanist via publish #4009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant