From 9ea935df84e9b7ac91bbc910d16f2d03ff669bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?batuhan=20i=C3=A7=C3=B6z?= Date: Wed, 3 Jan 2024 01:33:14 +0100 Subject: [PATCH] move email `from` field to env variables --- src/emails/sender.ts | 2 +- src/env.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emails/sender.ts b/src/emails/sender.ts index 0179557..ddeb454 100644 --- a/src/emails/sender.ts +++ b/src/emails/sender.ts @@ -89,7 +89,7 @@ async function prepareEmail({ }: PrepareEmailProps): Promise { const emailRenderProps = { ...templateProps, APP_URL: env.APP_URL } - const from = 'Interval ' + const from = env.EMAIL_FROM const subject = subjectBuilder(templateProps) const html = await emailTemplate.render(template, emailRenderProps) diff --git a/src/env.ts b/src/env.ts index 8e26bdf..629d219 100644 --- a/src/env.ts +++ b/src/env.ts @@ -21,6 +21,7 @@ const schema = z.object({ // emails POSTMARK_API_KEY: z.string().optional(), + EMAIL_FROM: z.string().optional().default('Interval '), // authentication WORKOS_API_KEY: z.string().optional(),