feat(email): let self-hosters brand transactional emails - #445
Open
faizan47 wants to merge 1 commit into
Open
Conversation
The sign-in, invite, welcome, and password-reset emails hardcoded "Quackback" in their subjects and headings, so an install running under its own brand still sent mail naming the platform in the one place in-app theming, a custom logo, and a custom domain never reach — the recipient's inbox. Add an EMAIL_BRAND_NAME env var (default "Quackback") and thread it through those subjects and templates as a product name that stays separate from each workspace's own name, so "join Acme on Quackback" keeps both halves distinct. Existing installs are unchanged.
|
|
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Fixes #444.
Most of Quackback white-labels fine already: workspace name, logo, colors, custom domain. The transactional emails were the gap. A handful of them hardcode "Quackback" in the subject and the heading, so an install running under its own brand still sends sign-in and password-reset mail that names the platform in the recipient's inbox, the one surface none of the in-app theming reaches.
The notification emails (status change, new comment, changelog) already read the workspace name and were fine. This only touches the auth and onboarding set.
What changed
A new
EMAIL_BRAND_NAMEenv var, defaulting to"Quackback". When set, it replaces the hardcoded product name in:It's passed as a
brandNameprop into the templates (default"Quackback"), so the components stay self-contained and existing installs render exactly as before.I kept it separate from
workspaceNameon purpose.workspaceNameis the board the mail is about; the brand name is the product it's sent from. Keeping them distinct means "join Acme on Quackback" still reads right instead of collapsing to "join Acme on Acme".I left the "Powered by Quackback" footer alone, since that's the existing attribution link with its own toggle and seemed out of scope here.
On the config surface
I went with an env var because the email package is already env-configured (EMAIL_FROM, SMTP, SES), and it keeps the change contained with no call-site changes. If you'd rather source the name from
settingsso it can be set in the admin UI, I'm glad to switch it over. Just say so.Testing
email-brand-name.test.tscovering the custom brand and the "Quackback" default for each affected templateprettier,oxlint, and the email packagetsc --noEmitare cleanDocumented the var in
.env.exampleand.env.prod.example.