Skip to content

Commit

Permalink
move email from field to env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
batuhan committed Jan 3, 2024
1 parent 1aabe1c commit 9ea935d
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 9ea935d

Please sign in to comment.