From c71b54644653e74b830072174e50fe293fa4b071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 15 May 2024 16:57:24 +0200 Subject: [PATCH] feat(core): Add an option to disable STARTTLS for SMTP connections --- packages/cli/src/UserManagement/email/NodeMailer.ts | 1 + packages/cli/src/config/schema.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/cli/src/UserManagement/email/NodeMailer.ts b/packages/cli/src/UserManagement/email/NodeMailer.ts index 824a6801f4195..f6eedd80ac70f 100644 --- a/packages/cli/src/UserManagement/email/NodeMailer.ts +++ b/packages/cli/src/UserManagement/email/NodeMailer.ts @@ -19,6 +19,7 @@ export class NodeMailer { host: config.getEnv('userManagement.emails.smtp.host'), port: config.getEnv('userManagement.emails.smtp.port'), secure: config.getEnv('userManagement.emails.smtp.secure'), + ignoreTLS: !config.getEnv('userManagement.emails.smtp.startTLS'), }; if ( diff --git a/packages/cli/src/config/schema.ts b/packages/cli/src/config/schema.ts index 15e746f2d9837..1ea7c57f00c1c 100644 --- a/packages/cli/src/config/schema.ts +++ b/packages/cli/src/config/schema.ts @@ -816,6 +816,12 @@ export const schema = { default: true, env: 'N8N_SMTP_SSL', }, + startTLS: { + doc: 'Whether or not to use STARTTLS for SMTP when SSL is disabled', + format: Boolean, + default: true, + env: 'N8N_SMTP_STARTTLS', + }, auth: { user: { doc: 'SMTP login username',