⚙️ Allow user to customize the sender name for mails (#1023)

Co-authored-by: Tom De Puysseleyr <tom.depuysseleyr@belorta.Be>
This commit is contained in:
BMaster 2024-02-17 06:16:22 +01:00 committed by GitHub
parent a554bed5df
commit a675897e2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View file

@ -41,6 +41,11 @@ These variables need to be configured to let Rallly send out transactional email
`SUPPORT_EMAIL` will be used instead. `SUPPORT_EMAIL` will be used instead.
</ParamField> </ParamField>
<ParamField path="NOREPLY_EMAIL_NAME">
This name is used as the sender name for all transactional emails. If not set,
`Rallly` will be used instead.
</ParamField>
<ParamField path="SUPPORT_EMAIL" required> <ParamField path="SUPPORT_EMAIL" required>
This email will be shown as the contact email for support queries. This email will be shown as the contact email for support queries.
</ParamField> </ParamField>

View file

@ -12,7 +12,9 @@ export const emailClient = new EmailClient({
}, },
mail: { mail: {
from: { from: {
name: "Rallly", name:
(process.env.NOREPLY_EMAIL_NAME as string) ||
"Rallly",
address: address:
(process.env.NOREPLY_EMAIL as string) || (process.env.NOREPLY_EMAIL as string) ||
(process.env.SUPPORT_EMAIL as string), (process.env.SUPPORT_EMAIL as string),

View file

@ -89,6 +89,7 @@
"NEXT_PUBLIC_VERCEL_URL", "NEXT_PUBLIC_VERCEL_URL",
"NODE_ENV", "NODE_ENV",
"NOREPLY_EMAIL", "NOREPLY_EMAIL",
"NOREPLY_EMAIL_NAME",
"OIDC_NAME", "OIDC_NAME",
"OIDC_DISCOVERY_URL", "OIDC_DISCOVERY_URL",
"OIDC_CLIENT_ID", "OIDC_CLIENT_ID",