From bebf2d89d335c48659d2e25cb9f6f8310e867fc5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 22 Mar 2018 16:12:52 +0100 Subject: Add option to disable starttls --- server/initializers/constants.ts | 1 + server/lib/emailer.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 3cf9ea36d..705d9b520 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -106,6 +106,7 @@ const CONFIG = { USERNAME: config.get('smtp.username'), PASSWORD: config.get('smtp.password'), TLS: config.get('smtp.tls'), + DISABLE_STARTTLS: config.get('smtp.disable_starttls'), CA_FILE: config.get('smtp.ca_file'), FROM_ADDRESS: config.get('smtp.from_address') }, diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 1b905e510..f34d141ea 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -46,7 +46,7 @@ class Emailer { secure: CONFIG.SMTP.TLS, debug: CONFIG.LOG.LEVEL === 'debug', logger: bunyanLogger as any, - ignoreTLS: isTestInstance() || CONFIG.SMTP.HOSTNAME === 'localhost' || CONFIG.SMTP.HOSTNAME === '127.0.0.1', + ignoreTLS: CONFIG.SMTP.DISABLE_STARTTLS, tls, auth }) -- cgit v1.2.3