Skip to content

Commit

Permalink
Merge pull request #6 from batuhan/main
Browse files Browse the repository at this point in the history
move email `from` field to env variables
  • Loading branch information
jacobmischka authored Jan 5, 2024
2 parents 1aabe1c + 9ea935d commit 6e94996
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/emails/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async function prepareEmail<T extends TemplateData>({
}: PrepareEmailProps<T>): Promise<PreparedEmail> {
const emailRenderProps = { ...templateProps, APP_URL: env.APP_URL }

const from = 'Interval <[email protected]>'
const from = env.EMAIL_FROM
const subject = subjectBuilder(templateProps)
const html = await emailTemplate.render(template, emailRenderProps)

Expand Down
1 change: 1 addition & 0 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const schema = z.object({

// emails
POSTMARK_API_KEY: z.string().optional(),
EMAIL_FROM: z.string().optional().default('Interval <[email protected]>'),

// authentication
WORKOS_API_KEY: z.string().optional(),
Expand Down

0 comments on commit 6e94996

Please sign in to comment.