Skip to content

Commit

Permalink
Refactor: Update email subject and add text content in resend-mailer.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
joywin2003 committed Sep 16, 2024
1 parent 3291d7f commit adefa09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/resend-mailer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export interface ResendEmailOptions {
to: string;
subject: string;
react: ReactNode;
text: string;
}

0 comments on commit adefa09

Please sign in to comment.