Log mail
This commit is contained in:
parent
9ccc2d7b14
commit
24100d6f83
|
@ -1,3 +1,4 @@
|
||||||
|
const log = require('utils/log');
|
||||||
const config = require('settings/config');
|
const config = require('settings/config');
|
||||||
const mail = require('emailjs');
|
const mail = require('emailjs');
|
||||||
|
|
||||||
|
@ -10,5 +11,12 @@ module.exports = function(params, callback) {
|
||||||
tls: config.MAIL.TLS
|
tls: config.MAIL.TLS
|
||||||
});
|
});
|
||||||
|
|
||||||
server.send(params, callback);
|
server.send(params, function(err) {
|
||||||
|
if (err === null) {
|
||||||
|
log.debug("Mail sent successfully");
|
||||||
|
} else {
|
||||||
|
log.debug("Error in sending mail " + err);
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue