From dcdcc40a4a0d5dc9f9014535e01c56cf99d8d120 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 25 Jan 2024 03:20:26 +0400 Subject: [PATCH] Update smtp-service.ts --- backend-pg/src/services/smtp/smtp-service.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend-pg/src/services/smtp/smtp-service.ts b/backend-pg/src/services/smtp/smtp-service.ts index 1ed353372..ae75842db 100644 --- a/backend-pg/src/services/smtp/smtp-service.ts +++ b/backend-pg/src/services/smtp/smtp-service.ts @@ -51,10 +51,7 @@ export const getTlsOption = (host?: SmtpHost | string, secure?: boolean) => { }; export const smtpServiceFactory = (cfg: TSmtpConfig) => { - const smtp = createTransport({ - ...cfg, - ...getTlsOption(cfg.host, cfg.secure) - }); + const smtp = createTransport({ ...cfg, ...getTlsOption(cfg.host, cfg.secure) }); const isSmtpOn = Boolean(cfg.host); const sendMail = async ({ substitutions, recipients, template, subjectLine }: TSmtpSendMail) => { @@ -63,6 +60,7 @@ export const smtpServiceFactory = (cfg: TSmtpConfig) => { const htmlToSend = temp(substitutions); if (isSmtpOn) { await smtp.sendMail({ + from: cfg.from, to: recipients.join(", "), subject: subjectLine, html: htmlToSend