diff --git a/lib/configuration.js b/lib/configuration.js index 4c4957e57866824105433609fea062849e2d5bb1..f7c135ad0b1be96de4be69608508801cccda734c 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -114,7 +114,8 @@ var conf = module.exports = convict({ smtp: { host: 'string?', user: 'string?', - pass: 'string?' + pass: 'string?', + port: 'integer = 25' }, statsd: { enabled: { diff --git a/lib/email.js b/lib/email.js index 4bb0c50d650bb74a5a8b4d47ac047c14ec71d52c..ee444477bafefe220a3b6bcf432a8766d0e6a209 100644 --- a/lib/email.js +++ b/lib/email.js @@ -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;