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);