Add option to disable starttls
This commit is contained in:
parent
a38b297d90
commit
bebf2d89d3
|
@ -25,6 +25,7 @@ smtp:
|
||||||
username: null
|
username: null
|
||||||
password: null
|
password: null
|
||||||
tls: true
|
tls: true
|
||||||
|
disable_starttls: false
|
||||||
ca_file: null # Used for self signed certificates
|
ca_file: null # Used for self signed certificates
|
||||||
from_address: 'admin@example.com'
|
from_address: 'admin@example.com'
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ smtp:
|
||||||
username: null
|
username: null
|
||||||
password: null
|
password: null
|
||||||
tls: true
|
tls: true
|
||||||
|
disable_starttls: false
|
||||||
ca_file: null # Used for self signed certificates
|
ca_file: null # Used for self signed certificates
|
||||||
from_address: 'admin@example.com'
|
from_address: 'admin@example.com'
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ smtp:
|
||||||
hostname: null
|
hostname: null
|
||||||
port: 1025
|
port: 1025
|
||||||
tls: false
|
tls: false
|
||||||
|
disable_starttls: true
|
||||||
from_address: 'test-admin@localhost'
|
from_address: 'test-admin@localhost'
|
||||||
username: null
|
username: null
|
||||||
password: null
|
password: null
|
||||||
|
|
|
@ -106,6 +106,7 @@ const CONFIG = {
|
||||||
USERNAME: config.get<string>('smtp.username'),
|
USERNAME: config.get<string>('smtp.username'),
|
||||||
PASSWORD: config.get<string>('smtp.password'),
|
PASSWORD: config.get<string>('smtp.password'),
|
||||||
TLS: config.get<boolean>('smtp.tls'),
|
TLS: config.get<boolean>('smtp.tls'),
|
||||||
|
DISABLE_STARTTLS: config.get<boolean>('smtp.disable_starttls'),
|
||||||
CA_FILE: config.get<string>('smtp.ca_file'),
|
CA_FILE: config.get<string>('smtp.ca_file'),
|
||||||
FROM_ADDRESS: config.get<string>('smtp.from_address')
|
FROM_ADDRESS: config.get<string>('smtp.from_address')
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Emailer {
|
||||||
secure: CONFIG.SMTP.TLS,
|
secure: CONFIG.SMTP.TLS,
|
||||||
debug: CONFIG.LOG.LEVEL === 'debug',
|
debug: CONFIG.LOG.LEVEL === 'debug',
|
||||||
logger: bunyanLogger as any,
|
logger: bunyanLogger as any,
|
||||||
ignoreTLS: isTestInstance() || CONFIG.SMTP.HOSTNAME === 'localhost' || CONFIG.SMTP.HOSTNAME === '127.0.0.1',
|
ignoreTLS: CONFIG.SMTP.DISABLE_STARTTLS,
|
||||||
tls,
|
tls,
|
||||||
auth
|
auth
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,6 +28,7 @@ smtp:
|
||||||
username: null
|
username: null
|
||||||
password: null
|
password: null
|
||||||
tls: true
|
tls: true
|
||||||
|
disable_starttls: false
|
||||||
ca_file: null # Used for self signed certificates
|
ca_file: null # Used for self signed certificates
|
||||||
from_address: 'admin@example.com'
|
from_address: 'admin@example.com'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue