Skip to content

Let a send set its own sender address - #49

Merged
chrisllontop merged 2 commits into
mainfrom
per-send-sender-address
Nov 27, 2026
Merged

chrisllontop merged 2 commits into
mainfrom
per-send-sender-address

Conversation

@chrisllontop

Copy link
Copy Markdown
Owner

Summary

A send or a schedule can set email.from, a sender address for that send alone, in place of the one saved on the Channels page. fromName and replyTo keep working beside it; a send without from is unchanged. The override travels the same path fromName and replyTo already did: it is stored in email_overrides (JSON, no migration), replayed when a schedule fires, and used by the email adapter.

 emailOptionsSchema = z.object({
+  from: z.string().email().optional(),
   fromName: z.string().max(256).optional(),
   replyTo: z.string().email().optional(),
   attachments: ...
 })
-senderAddress(emailConfig.from, overrides.fromName ?? emailConfig.fromName)
+senderAddress(overrides.from ?? emailConfig.from, overrides.fromName ?? emailConfig.fromName)

The four copies of the override type become one EmailOverrides. The address must be on a domain verified for Email Sending; Cloudflare refuses any other with E_SENDER_NOT_VERIFIED, which already fails the delivery for good. The docs and the skill name the field, and the skill's migration plan no longer lists a sender address of its own among what Chaski can't do.

Evidence

  • Before: zod's object schema drops an unknown email.from, so every email left from the Channels page's address.
    After: test/email.test.ts › "applies a per-send sender address, with the configured name unless the send names one" sends from founder@host.test with the configured name, then with its own. pnpm check passes (dashboard build, typecheck, lint, tests, site build).
  • Not run against main to watch the new test fail there.

Merge Danger

Door: two-way

Blast Radius: email

Additive: a send that doesn't set from builds the same message as before.

An optional email.from replaces the sender address saved on the Channels page for that send alone, on scheduled sends too; fromName and replyTo keep working beside it.
@chrisllontop chrisllontop added the enhancement New feature or request label Nov 27, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://per-send-sender-address-chaski.chrisllontop.workers.dev (commit fc452c6)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://45cef904-chaski.chrisllontop.workers.dev fc452c6 2026-11-27T04:33:16.603Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1ddb9fd2-chaski.chrisllontop.workers.dev 1c068f9 2026-11-27T04:17:00.601Z Visit the dashboard ↗

@chrisllontop
chrisllontop merged commit fb73489 into main Nov 27, 2026
2 checks passed
@chrisllontop
chrisllontop deleted the per-send-sender-address branch November 27, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant