diff options
author | Scisco <alireza@developmentseed.org> | 2014-07-17 13:09:05 -0400 |
---|---|---|
committer | Scisco <alireza@developmentseed.org> | 2014-07-17 13:09:05 -0400 |
commit | f4a6440b71d58db09c800c20b6bde4f8a7a275e2 (patch) | |
tree | 354f21526b5dfa85a19e24d40690028e7daae900 /jekyll-hook.js | |
parent | 805ba85ff3008bfcb6e146eddfd1d3ba9c5fd21b (diff) |
Added an activate key for the email in config and code
Diffstat (limited to 'jekyll-hook.js')
-rwxr-xr-x | jekyll-hook.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/jekyll-hook.js b/jekyll-hook.js index 32359e2..80db6fd 100755 --- a/jekyll-hook.js +++ b/jekyll-hook.js @@ -112,13 +112,15 @@ function run(file, params, cb) { } function send(body, subject, data) { - if (config.email && data.pusher.email) { - var message = { - text: body, - from: config.email.user, - to: data.pusher.email, - subject: subject - }; - mailer.send(message, function(err) { if (err) console.warn(err); }); + if (config.email.isActivated) { + if (config.email && data.pusher.email) { + var message = { + text: body, + from: config.email.user, + to: data.pusher.email, + subject: subject + }; + mailer.send(message, function(err) { if (err) console.warn(err); }); + } } } |