finished reset password & other changes
This commit is contained in:
28
templates/email/send-verification-email.ts
Normal file
28
templates/email/send-verification-email.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { _ctBatch } from '@/lib/translate'
|
||||
import { env } from '@/lib/utils'
|
||||
|
||||
type Props = {
|
||||
confirmLink: string
|
||||
}
|
||||
|
||||
const keys: any = {
|
||||
follow: 'follow',
|
||||
click: 'click',
|
||||
here: 'here',
|
||||
confirm: 'confirmed_email',
|
||||
p1: ['body.send_verification_email.p1', { site_name: env('SITE_NAME') }],
|
||||
p2: 'body.send_verification_email.p2',
|
||||
} as const
|
||||
|
||||
export const body = async ({ confirmLink }: Props) => {
|
||||
const t: any = await _ctBatch(keys, 'mailer')
|
||||
|
||||
return {
|
||||
text: `${t?.p1}\n
|
||||
${t?.follow}: ${confirmLink} ${t?.confirm}
|
||||
${t?.p2}` as const,
|
||||
html: `<p>${t?.p1}</p>
|
||||
<p>${t?.click} <a href="${confirmLink}">${t?.here}</a> ${t?.confirm}</p>
|
||||
<p>${t?.p2}</p>` as const,
|
||||
} as const
|
||||
}
|
||||
Reference in New Issue
Block a user