Skip to content

Commit 6e94996

Browse files
authored
Merge pull request #6 from batuhan/main
move email `from` field to env variables
2 parents 1aabe1c + 9ea935d commit 6e94996

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/emails/sender.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function prepareEmail<T extends TemplateData>({
8989
}: PrepareEmailProps<T>): Promise<PreparedEmail> {
9090
const emailRenderProps = { ...templateProps, APP_URL: env.APP_URL }
9191

92-
const from = 'Interval <help@interval.com>'
92+
const from = env.EMAIL_FROM
9393
const subject = subjectBuilder(templateProps)
9494
const html = await emailTemplate.render(template, emailRenderProps)
9595

src/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const schema = z.object({
2121

2222
// emails
2323
POSTMARK_API_KEY: z.string().optional(),
24+
EMAIL_FROM: z.string().optional().default('Interval <help@interval.com>'),
2425

2526
// authentication
2627
WORKOS_API_KEY: z.string().optional(),

0 commit comments

Comments
 (0)