Repository navigation
Let a send set its own sender address - #49
Merged
Merged
Conversation
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.
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://per-send-sender-address-chaski.chrisllontop.workers.dev (commit fc452c6)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.fromNameandreplyTokeep working beside it; a send withoutfromis unchanged. The override travels the same pathfromNameandreplyToalready did: it is stored inemail_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 withE_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
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 fromfounder@host.testwith the configured name, then with its own.pnpm checkpasses (dashboard build, typecheck, lint, tests, site build).mainto watch the new test fail there.Merge Danger
Door: two-way
Blast Radius: email
Additive: a send that doesn't set
frombuilds the same message as before.