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 `

Verify your email

Click the button below to verify your email address and activate your LabWise account.

Verify Email

If you didn't create a LabWise account, you can ignore this email.

`; } export function resetPasswordEmailHtml(url: string) { return `

Reset your password

Click the button below to reset your LabWise password. This link expires in 1 hour.

Reset Password

If you didn't request this, you can ignore this email.

`; }