From 58301a43418694e148f195db41f8365e16ea6ecf Mon Sep 17 00:00:00 2001 From: Anton Shepilov Date: Mon, 4 Mar 2024 18:11:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Be=20able=20to=20use=20SMTP=20transpor?= =?UTF-8?q?t=20without=20TLS=20(#406)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../node/src/core/platform/services/email-pusher/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tdrive/backend/node/src/core/platform/services/email-pusher/index.ts b/tdrive/backend/node/src/core/platform/services/email-pusher/index.ts index b87df43f..c444a56f 100644 --- a/tdrive/backend/node/src/core/platform/services/email-pusher/index.ts +++ b/tdrive/backend/node/src/core/platform/services/email-pusher/index.ts @@ -43,12 +43,13 @@ export default class EmailPusherClass this.interface = this.configuration.get("email_interface", ""); this.platformUrl = this.configuration.get("platform_url", ""); if (this.interface === "smtp") { + const useTLS = this.configuration.get("smtp_tls", "false") == "true"; const smtpConfig: SMTPClientConfigType = { host: this.configuration.get("smtp_host", ""), port: this.configuration.get("smtp_port", 25), secure: false, - ignoreTLS: !this.configuration.get("smtp_tls", false), - requireTLS: this.configuration.get("smtp_tls", true), + ignoreTLS: !useTLS, + requireTLS: useTLS, }; this.logger.info(`Start SMTP client with configuration: ${JSON.stringify(smtpConfig)}`); this.transporter = nodemailer.createTransport(smtpConfig);