refactor code to have a relay provider

part of #188
This commit is contained in:
Girish Ramakrishnan
2017-06-28 09:51:01 -05:00
parent 00990b6837
commit 01d0e56332
7 changed files with 56 additions and 43 deletions

View File

@@ -260,7 +260,7 @@ function createMailConfig(callback) {
settings.getMailRelay(function (error, relay) {
if (error) return callback(error);
const enabled = relay.enabled || false,
const enabled = relay.provider === 'cloudron-smtp' ? true : false,
host = relay.host || '',
port = relay.port || 25,
tls = !!relay.tls,