-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Update email subject and add text content in resend-mailer.ts
- Loading branch information
1 parent
3291d7f
commit adefa09
Showing
2 changed files
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,13 @@ export async function MailUsingResend({ email, name, OTP }: SendEmailType) { | |
const mailOptions: ResendEmailOptions = { | ||
from: "Tedx SJEC <[email protected]>", | ||
to: email, | ||
subject: "Email Verification", | ||
subject: "Tedx SJEC - Your OTP for Email Verification", | ||
react: EmailTemplate({ | ||
name: name, | ||
OTP: OTP, | ||
email: email, | ||
}), | ||
text: `Hello ${name},\n\nThank you for registering for Tedx 2024.\n\nYour One-Time Password (OTP) for email verification is:\n\n${OTP}\n\nPlease enter this OTP to complete your registration. The OTP is valid for 10 minutes.\n\nThank you!\n\nTedx SJEC Team`, | ||
}; | ||
|
||
const { data, error } = await resend.emails.send(mailOptions); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ export interface ResendEmailOptions { | |
to: string; | ||
subject: string; | ||
react: ReactNode; | ||
text: string; | ||
} |