Repository navigation
Add a configurable Reply-To to all CMS mails - #288
Merged
Merged
Conversation
Mails go out from EMAIL_FROM, which cannot receive replies, and Directus has no default Reply-To setting. A new `mail-reply-to` filter hook on `email.send` adds EMAIL_REPLY_TO to every mail sent through the MailService (bundle mails, newsletter, Directus system mails, Flows). A Reply-To set by the caller is kept; unset or empty is a no-op. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FBHiR6NFRe6QR5SBjSv4nw
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Resolve docs/tickets.md env table: keep both the EMAIL_REPLY_TO and the ACCOUNTING_INVOICE_EMAIL rows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FBHiR6NFRe6QR5SBjSv4nw
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped implementation matches the documented behavior and includes focused tests, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Adds an optional default Reply-To address across CMS emails so replies can reach a monitored inbox.
Changes:
- Registers an
email.sendhook using trimmedEMAIL_REPLY_TO, preserving caller-supplied Reply-To values. - Adds tests for configured, overridden, and unset values.
- Documents configuration and newsletter behavior.
| File | Description |
|---|---|
| docs/tickets.md | Documents the optional environment variable. |
| docs/newsletter.md | Clarifies newsletter Reply-To behavior. |
| directus-cms/extensions/directus-extension-programmierbar-bundle/src/mail-reply-to/index.ts | Implements the default Reply-To hook. |
| directus-cms/extensions/directus-extension-programmierbar-bundle/src/mail-reply-to/__tests__/index.test.ts | Tests configuration and caller overrides. |
| directus-cms/extensions/directus-extension-programmierbar-bundle/package.json | Registers the hook in the bundle. |
| directus-cms/.env.example | Adds configuration guidance and an example. |
Review effort: Balanced
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
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.
Requested by Richard Hartmann · Slack thread
Before: every mail the CMS sends (ticket confirmations, speaker portal, newsletter, Directus password reset/invites, Flows) goes out from
EMAIL_FROM, an address that cannot receive mail. Replies are lost.After: if
EMAIL_REPLY_TOis set, every one of these mails carries it as Reply-To, so replies land in a real inbox.How
mail-reply-to(src/mail-reply-to/index.ts): a filter onemail.send, which Directus'MailService.sendruns before every mail. It addsreplyTofromEMAIL_REPLY_TO(read from the extension contextenv, likeINVOICE_FILES_FOLDER). Directus itself has no env for a default Reply-To.directus-cms/.env.example,docs/tickets.md(Directus env table) anddocs/newsletter.md.Deployment
EMAIL_REPLY_TO=<inbox address>(e.g.podcast@programmier.bar) in the Directus environment.Generated by Claude Code