const nodemailer = require('nodemailer'); const { SESv2Client, SendEmailCommand } = require('@aws-sdk/client-sesv2'); const sesClient = new SESv2Client({ region: process.env.AWS_REGION, credentials: { accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, }, }); // Create the transporter const transporter = nodemailer.createTransport({ SES: { sesClient, SendEmailCommand }, }); // Helper function to send email async function sendVerificationEmail(toEmail, token, name) { const verificationLink = `https://wahwa.com/verify-email?token=${token}`; try { const info = await transporter.sendMail({ from: `"BlindMaster" <${process.env.EMAIL_FROM}>`, // Sender address to: toEmail, subject: "Verify your BlindMaster account", html: `