From a675897e2cd2483b38128f9c5fefee1dc623078f Mon Sep 17 00:00:00 2001 From: BMaster Date: Sat, 17 Feb 2024 06:16:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Allow=20user=20to=20custom?= =?UTF-8?q?ize=20the=20sender=20name=20for=20mails=20(#1023)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tom De Puysseleyr --- apps/docs/self-hosting/configuration-options.mdx | 5 +++++ apps/web/src/utils/emails.ts | 4 +++- turbo.json | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/docs/self-hosting/configuration-options.mdx b/apps/docs/self-hosting/configuration-options.mdx index 233db2f38..e8bafd508 100644 --- a/apps/docs/self-hosting/configuration-options.mdx +++ b/apps/docs/self-hosting/configuration-options.mdx @@ -41,6 +41,11 @@ These variables need to be configured to let Rallly send out transactional email `SUPPORT_EMAIL` will be used instead. + + This name is used as the sender name for all transactional emails. If not set, + `Rallly` will be used instead. + + This email will be shown as the contact email for support queries. diff --git a/apps/web/src/utils/emails.ts b/apps/web/src/utils/emails.ts index ebed1f8f3..7ca7538e8 100644 --- a/apps/web/src/utils/emails.ts +++ b/apps/web/src/utils/emails.ts @@ -12,7 +12,9 @@ export const emailClient = new EmailClient({ }, mail: { from: { - name: "Rallly", + name: + (process.env.NOREPLY_EMAIL_NAME as string) || + "Rallly", address: (process.env.NOREPLY_EMAIL as string) || (process.env.SUPPORT_EMAIL as string), diff --git a/turbo.json b/turbo.json index 9f245690f..906362445 100644 --- a/turbo.json +++ b/turbo.json @@ -89,6 +89,7 @@ "NEXT_PUBLIC_VERCEL_URL", "NODE_ENV", "NOREPLY_EMAIL", + "NOREPLY_EMAIL_NAME", "OIDC_NAME", "OIDC_DISCOVERY_URL", "OIDC_CLIENT_ID",