1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17import { SES } from '@aws-sdk/client-ses'; import { formatEmail } from './formatEmail'; const ses = new SES({ region: 'us-east-2' }); export const sendEmail = async ({ to, subject, body }) => { try { await ses.sendEmail({ Destination: { ToAddresses: [to] }, Source: `noreply@equalify.uic.edu`, Message: { Subject: { Data: subject }, Body: { Html: { Data: formatEmail({ body }) } }, }, }); } catch (err) { console.log(err); } }