Repository navigation
feat(users): host-overridable auth email templates with an HTML part (#712) - #716
Merged
Merged
Conversation
Sandbox host mail templates (the directory list is admin-editable), read the app name once per send, describe the setting. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Deploying simple-module-python with
|
| Latest commit: |
4b6c26f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2bb77d37.simple-module-python.pages.dev |
| Branch Preview URL: | https://feat-b30-users-mail-template.simple-module-python.pages.dev |
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. |
7 tasks
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.
Hosts can now override the users module's auth emails and send them with an HTML part.
Closes #712
What changed
UsersSettings.mail_template_dirs(a list of absolute directories, restart-required, no env var). The mailer searches them in order, then the bundled templates, for each file separately, so a host can override just one email..htmlsiblings (verify_email.html,reset_password.html,invite.html) are rendered with autoescape on and sent asMailMessage.htmlnext to the text part. Without one, the email is text-only, as before.__class__.__mro__escape is refused.TemplatedMailerandbuild_mailertake a keyword-onlytemplate_dirs=argument.docs/modules/users.md§ Overriding auth email templates, plus the settings table.Verification
make lint✓ ·make test-js✓ ·make test-py✓ (6472 passed, 41 skipped)test_users_mailer_templates.py(16 tests): directory order, per-file fallback, HTML-only override, escaping, sandbox, invalid dirs skipped, startup forwarding the DB setting.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4