diff --git a/src/services/ses/ses-utils.ts b/src/services/ses/ses-utils.ts index bb6bc78..c7bcc16 100644 --- a/src/services/ses/ses-utils.ts +++ b/src/services/ses/ses-utils.ts @@ -38,3 +38,30 @@ export function sendEmail( }) .promise(); } + +export function sendHTMLEmail( + emailId: string, + subject: string, + emailHtml: string +): Promise { + return ses + .sendEmail({ + Destination: { + ToAddresses: [emailId], + }, + Message: { + Body: { + Html: { + Data: emailHtml, + }, + }, + Subject: { + Data: subject, + }, + }, + Source: Config.OUTGOING_EMAIL_ADDRESSES.Enum[ + "no-reply@reflectionsprojections.org" + ], + }) + .promise(); +}