Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Update smtp-service.ts

Daniel Hougaarddcdcc40a4a0d
diff --git a/backend-pg/src/services/smtp/smtp-service.ts b/backend-pg/src/services/smtp/smtp-service.ts
index 1ed3533726..ae75842dbd 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