From 38c2b38aa42d00091734d5a077936526cd799b08 Mon Sep 17 00:00:00 2001 From: Szotkowski Date: Thu, 28 Sep 2023 00:30:45 +0200 Subject: [PATCH] add sendError --- src/services/email.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/services/email.ts b/src/services/email.ts index 0d7289b..2be848c 100644 --- a/src/services/email.ts +++ b/src/services/email.ts @@ -89,4 +89,13 @@ export class EmailService { html: body, }); } + + async sendError(error: string): Promise { + await EmailDataSource.sendMail({ + from: process.env.EMAIL_USER, + to: 'error@selecro.cz', + subject: 'Selecro: error', + html: error, + }); + } }