# Running the newsletter on Cloudflare and Amazon SES One deployment serves one publication. The publisher owns the Cloudflare and AWS accounts and controls the sender domain. Newsman stores the audience and editions. Amazon SES v2 delivers confirmation mail, test mail and individual copies of each issue. A delivery receipt means the receiving mail server accepted the message. Inbox placement and reader engagement are separate measurements. ## What to deploy | Component | Responsibility | | --- | --- | | Cloudflare Worker | Serve the operator web app and HTTP MCP endpoint, handle the site's signup and reader actions, verify provider feedback, and run scheduled and queued work. All operator actions go through the shared authorization and command layer. | | D1 | Store reader status and consent history, suppressions, issue revisions, approved campaigns, immutable audience membership, delivery attempts, receipts, command keys and audit records. Put audience data in a dedicated private database. Use indexed opaque identifiers in links and jobs. | | Private R2 bucket | Store immutable email images, staged import files, completed exports and backup objects. Give files scoped, expiring access. Give a mailbox client access only to the individual image intended for email. | | Cron Trigger and Queues | Cron discovers due work and abandoned job leases. Queue messages carry opaque IDs. D1 owns the work state so expiration, redelivery and overlapping ticks are recoverable. | | SES and an SNS Standard topic | SES sends in a single configured region. A configuration set forwards event records to a signed HTTPS subscription on the Worker. A monitored publisher mailbox receives replies. | Deploy the Worker using Cloudflare bindings and the Cloudflare CLI. The site adapter can use a service binding while keeping its existing same-origin form contract. Configure the canonical HTTPS origin, publisher identity, From, Reply-To, postal address, display timezone, AWS region, expected SNS topic ARN and SES configuration set. Keep signing material, AWS credentials and OAuth secrets in Worker secrets. Sign SES v2 HTTPS requests with AWS Signature Version 4 for the configured service and region, using least-privilege credentials and the session token when present. Restrict the sender's AWS permissions to its verified identity, configuration set and sending needs. Use a separate administrative identity for AWS setup. Preview gets separate bindings, credentials, origins, queues and recipient limits. Its default sender writes to a local capture sink. SES mailbox simulator addresses or a fixed operator-owned seed inbox can exercise a real preview configuration. [Worker bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/) · [SES production access](https://docs.aws.amazon.com/ses/latest/dg/request-production-access.html) ## Rendering and planning Render from the existing site's issue source. At approval, persist the revision ID, a digest, subject, preheader, sender settings, HTML and plain text, link classifications, asset versions, UTC delivery time and archive release time. Use bound SQL parameters. Limit the combined serialized message snapshot to 512 KiB before writing it to a single D1 row. Reject an oversized revision with the measured size and limit during preview. Resolve personalization and unsubscribe links from the frozen template. A later edit creates a revision and requires fresh approval before it can replace a queued edition. [D1 limits](https://developers.cloudflare.com/d1/platform/limits/) When the publisher enables click tracking, use the first-party redirect as the canonical click source. Resolve opaque link IDs against frozen, approved HTTP(S) destinations. Exclude confirmation and unsubscribe links from rewriting. Classify editorial and sponsor clicks separately and label scanner uncertainty. Preserve historical provider metrics as a separate series. A provider click on an already tracked redirect contributes zero additional first-party clicks. Read an embargoed edition in email during the gap before its public release. Omit a “read online” link while its destination is private. Freeze the displayed email hero at approval. A dedicated Worker route may serve that one approved image from private R2 by an unguessable, issue-scoped read capability that works in ordinary email clients and can be shared by recipients. Serve an appropriate image media type, immutable bytes and no directory listing. Keep preview images private. Give visitors access to the canonical web issue, full-size archive assets and Atom entry together at the site's authorized public release. Record the committed audience cut, segment revision and selection timestamp for each campaign. Materialize recipient membership against that cut with a unique campaign and subscriber key. A large selection must support bounded paging using versioned membership or a materialized snapshot. A live mutable query cannot reproduce a prior audience. New confirmations after the cut wait for a later edition. Commit the selection and resumable outbox state before enqueueing IDs. Each dispatch checks current consent and suppression again. ## How a send survives interruption 1. Enforce a unique committed plan and one live dispatch per edition, even across operators and command keys. A later source correction updates the archive independently. The shared web/MCP command validates the expected revision and idempotency key, records the approved send or schedule and returns its durable ID. A repeated key with the same arguments returns the original result. A conflicting payload fails before dispatch. A UTC cron tick claims due work using a conditional write. Bounded pages and unique recipient rows let the next tick continue after a crash. 2. A queue consumer obtains a short D1 lease by conditional update. Before a network call, atomically verify that the campaign is enabled, the reader is still active and unsuppressed, and rate and volume capacity remain. Persist the attempt ID and `submitting` state. Use one recipient per `SendEmail`, a configuration set and opaque campaign, recipient-delivery and attempt tags. Disable automatic network/SDK retries for the submission. Correctness depends on the stored attempt even if two consumers handle the same queue item. Cancellation or opt-out blocks work that has yet to enter submission. A request already handed to SES may finish. 3. A successful SES response records the provider message ID and `accepted`. Track delivery, rejection, hard bounce and complaint from authenticated feedback. Permanent bounces and complaints immediately suppress future messages to the affected address. Transient delivery failures remain visible for the issue. A later delivery event cannot clear a suppression. Count each recipient once per reported outcome and use a separately labeled denominator for each rate. 4. A definite throttling rejection can be retried with backoff and jitter. A validation error ends the attempt and exposes a repairable cause. An expired lease before the submission fence may be reclaimed. A disconnect, timeout, server error, expired post-fence lease, or crash while persisting a success yields `unknown`. Do not automatically resend such an attempt. A signed SES event carrying its tags can reconcile it even if the initial reply was lost. Unresolved entries stay visible in both interfaces. Operators can record evidence of provider acceptance, permanently skip delivery, or authorize a new attempt after establishing that the original was never submitted. If the outcome remains uncertain, keep the hold or permanently skip. The same rule applies to web and MCP. [SES sending errors](https://docs.aws.amazon.com/ses/latest/dg/troubleshoot-error-messages.html) · [Cloudflare Queue delivery guarantees](https://developers.cloudflare.com/queues/reference/delivery-guarantees/) Apply the same boundary to confirmation and test mail. Deduplicate confirmation jobs by pending challenge and enforce a resend cooldown. Use a deployment-wide send-rate limiter and rolling 24-hour allowance below the SES account's current regional limits. Include confirmation and test traffic. Reserve before sending and charge unknown outcomes conservatively. Give due work a new dispatch opportunity when capacity returns. A local monthly ceiling, backlog age, throttling, unknown outcomes and feedback health are visible from the operator console and MCP. [SES quotas](https://docs.aws.amazon.com/ses/latest/dg/manage-sending-quotas.html) ## Provider setup and reader controls Verify the sending domain in the delivery region, enable Easy DKIM, publish the provided DNS records and set up DMARC alignment. For a custom MAIL FROM domain configure its MX and SPF as SES specifies. Obtain production access in that region before delivering to the general audience. Send a seed message and inspect its actual headers, aligned DKIM result, return path, monitored Reply-To and unsubscribe behavior. Enable SES account-level hard-bounce and complaint suppression as a second check. [SES DKIM](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim.html) · [Custom MAIL FROM](https://docs.aws.amazon.com/ses/latest/dg/mail-from.html) · [SES suppression](https://docs.aws.amazon.com/ses/latest/dg/sending-email-suppression-list.html) Add an HTTPS `List-Unsubscribe` URL and `List-Unsubscribe-Post: List-Unsubscribe=One-Click` to every newsletter. One valid aligned DKIM signature must cover both headers. Include a visible unsubscribe link in both rendered alternatives. An opaque, subscriber- and purpose-bound token authorizes exactly this reader's opt-out. Accept the RFC 8058 POST form, including its permitted encodings, without login, cookies or redirects. Persist the suppression before returning success. Repeats succeed. A GET opens a confirmation page with a deliberate POST action so scanner prefetches leave consent intact. Public signup and confirmation also respect suppression. Reserve resubscription for a fresh, explicit opt-in through the consent rules. [RFC 8058](https://datatracker.ietf.org/doc/html/rfc8058) · [SES one-click integration](https://aws.amazon.com/blogs/messaging-and-targeting/using-one-click-unsubscribe-with-amazon-ses/) Allow only the expected SES configuration set to publish to the expected SNS topic. Configure signature version 2 and standard signed SNS envelopes. Verify the topic ARN, canonical signed fields for the message type, signing certificate, chain and signature before any action. Restrict certificate lookup to documented HTTPS SNS hosts and paths in the configured AWS partition. Confirm the intended subscription through the AWS operation with the authenticated token and expected topic. Persist the SNS message ID and normalized event in one transaction before acknowledging. Return a retryable status for storage failure. Redelivery of an envelope, and duplicate semantic delivery or suppression events, must leave totals and state correct. Store provider event times independently of arrival order. Where complaint feedback identifies an address in this publication outside a known attempt, still apply the verified suppression. Unknown tags or events with insufficient identity become review items. Keep raw receipts, addresses and tokens out of logs. [SNS signature verification](https://docs.aws.amazon.com/sns/latest/dg/sns-verify-signature-of-message.html) · [SES event formats](https://docs.aws.amazon.com/ses/latest/dg/event-publishing-retrieving-sns-contents.html) ## Cost and recovery Illustrative US-dollar base estimates at published list rates on 2026-11-24, before credits. Each example assumes four issues a month, one recipient per send, and Cloudflare usage within applicable allowances. | Confirmed recipients | Issue deliveries | SES à-la-carte base | SES plus a stand-alone Workers Paid subscription | | ---: | ---: | ---: | ---: | | 1,000 | 4,000 | $0.40 | $5.40 | | 10,000 | 40,000 | $4.00 | $9.00 | SES base is $0.10 per 1,000 outbound emails. Add confirmations and tests, applicable data charges, SNS requests and HTTPS notifications, and any Cloudflare overages. Existing Workers Paid customers share the account's $5 monthly subscription and included capacity. Workers Free may cover a small publication. Check the actual send-day load against daily limits. A 10,000-reader issue using one successful small queue message per reader consumes about 30,000 queue operations alone. Workers Free currently includes 10,000 queue operations per day. Batching does not reduce that per-message meter. Show projected recipient count and base send cost at approval, then actual accepted attempts and measured usage. [SES pricing](https://aws.amazon.com/ses/pricing/) · [SNS pricing](https://aws.amazon.com/sns/pricing/) · [Workers pricing](https://developers.cloudflare.com/workers/platform/pricing/) · [Queues pricing](https://developers.cloudflare.com/queues/platform/pricing/) · [D1 pricing](https://developers.cloudflare.com/d1/platform/pricing/) · [R2 pricing](https://developers.cloudflare.com/r2/pricing/) Ship a deployment check for bindings, database migration version, sender status, event delivery and DNS. Start newly installed and restored instances with live dispatch paused. Keep recoverable database exports and a private backup of required objects, token keys and settings under the publisher's control. Test restoration in an isolated environment. D1 Time Travel covers the database only. Reconcile post-backup opt-outs, complaints, admissions, accepted or ambiguous attempts and queue generations before resuming. If a data-loss interval cannot be reconstructed, exclude the affected recipients or retire the affected edition. An operator should be able to explain who may still receive mail before turning dispatch on. [D1 Time Travel](https://developers.cloudflare.com/d1/reference/time-travel/)