Skip to content
Snippets Groups Projects
Commit ee1343ad authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

add smtp.port configuration for non-standard smtp ports

parent b2495ba5
No related branches found
No related tags found
No related merge requests found
......@@ -114,7 +114,8 @@ var conf = module.exports = convict({
smtp: {
host: 'string?',
user: 'string?',
pass: 'string?'
pass: 'string?',
port: 'integer = 25'
},
statsd: {
enabled: {
......
......@@ -13,7 +13,10 @@ logger = require('./logging.js').logger;
/* if smtp parameters are configured, use them */
try { var smtp_params = config.get('smtp'); } catch(e) {};
if (smtp_params && smtp_params.host) {
emailer.SMTP = { host: smtp_params.host };
emailer.SMTP = {
host: smtp_params.host,
port: smtp_params.port
};
logger.info("delivering email via SMTP host: " + emailer.SMTP.host);
if (smtp_params.user) {
emailer.SMTP.use_authentication = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment