aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-22 16:12:52 +0100
committerChocobozzz <me@florianbigard.com>2018-03-22 16:12:52 +0100
commitbebf2d89d335c48659d2e25cb9f6f8310e867fc5 (patch)
tree49548611f335073cd9988c4c5d87a113a1f65cc0 /server
parenta38b297d90a35abc8d5308f74eb2d2b64cef7c21 (diff)
downloadPeerTube-bebf2d89d335c48659d2e25cb9f6f8310e867fc5.tar.gz
PeerTube-bebf2d89d335c48659d2e25cb9f6f8310e867fc5.tar.zst
PeerTube-bebf2d89d335c48659d2e25cb9f6f8310e867fc5.zip
Add option to disable starttls
Diffstat (limited to 'server')
-rw-r--r--server/initializers/constants.ts1
-rw-r--r--server/lib/emailer.ts2
2 files changed, 2 insertions, 1 deletions
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 = {
106 USERNAME: config.get<string>('smtp.username'), 106 USERNAME: config.get<string>('smtp.username'),
107 PASSWORD: config.get<string>('smtp.password'), 107 PASSWORD: config.get<string>('smtp.password'),
108 TLS: config.get<boolean>('smtp.tls'), 108 TLS: config.get<boolean>('smtp.tls'),
109 DISABLE_STARTTLS: config.get<boolean>('smtp.disable_starttls'),
109 CA_FILE: config.get<string>('smtp.ca_file'), 110 CA_FILE: config.get<string>('smtp.ca_file'),
110 FROM_ADDRESS: config.get<string>('smtp.from_address') 111 FROM_ADDRESS: config.get<string>('smtp.from_address')
111 }, 112 },
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 {
46 secure: CONFIG.SMTP.TLS, 46 secure: CONFIG.SMTP.TLS,
47 debug: CONFIG.LOG.LEVEL === 'debug', 47 debug: CONFIG.LOG.LEVEL === 'debug',
48 logger: bunyanLogger as any, 48 logger: bunyanLogger as any,
49 ignoreTLS: isTestInstance() || CONFIG.SMTP.HOSTNAME === 'localhost' || CONFIG.SMTP.HOSTNAME === '127.0.0.1', 49 ignoreTLS: CONFIG.SMTP.DISABLE_STARTTLS,
50 tls, 50 tls,
51 auth 51 auth
52 }) 52 })