From d70a05b24f021b33f469831552c603c3c1f3864a Mon Sep 17 00:00:00 2001 From: Inga Lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Tue, 4 Feb 2014 13:09:41 +0400 Subject: [PATCH] Fixed a bug; emails moved to config --- BuildServer/lib/builder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BuildServer/lib/builder.js b/BuildServer/lib/builder.js index 78a2465..c529b76 100644 --- a/BuildServer/lib/builder.js +++ b/BuildServer/lib/builder.js @@ -83,15 +83,15 @@ var build = function (options, callback) { }, function (callback) { mailSender.send({ - from: 'Micro Build Server ', - to: '"Receiver Name" ', + from: settings.smtp.sender, + to: settings.smtp.receiver, subject: (err ? "Build failed for " : "Successfully built ") + owner + "/" + reponame + "/" + branch, headers: { 'X-Laziness-level': 1000 }, text: ("Build status URL: https://mbs.pos/status/" + owner + "/" + reponame + "/" + rev + "\r\n\r\n") + (err ? ("Error message: " + err + "\r\n\r\n") : "") + - ((!result.messages || !result.messages.$allMessages) ? JSON.stringify(result, null, 4) : result.messages.$allMessages.map(function (msg) { return msg.prefix + "\t" + msg.message; }).join("\r\n")) + ((!result || !result.messages || !result.messages.$allMessages) ? JSON.stringify(result, null, 4) : result.messages.$allMessages.map(function (msg) { return msg.prefix + "\t" + msg.message; }).join("\r\n")) }, callback); } ], callback);