import { SESClient, SendEmailCommand } from '@aws-sdk/client-ses'; const ses = new SESClient({ region: process.env.AWS_REGION || 'us-east-1' }); const FROM = process.env.FROM_EMAIL || 'noreply@labwise.wahwa.com'; export async function sendEmail({ to, subject, html, }: { to: string; subject: string; html: string; }) { await ses.send( new SendEmailCommand({ Source: FROM, Destination: { ToAddresses: [to] }, Message: { Subject: { Data: subject }, Body: { Html: { Data: html } }, }, }) ); } export function verificationEmailHtml(url: string) { return `
Click the button below to verify your email address and activate your LabWise account.
Verify EmailIf you didn't create a LabWise account, you can ignore this email.
Click the button below to reset your LabWise password. This link expires in 1 hour.
Reset PasswordIf you didn't request this, you can ignore this email.