summaryrefslogtreecommitdiff
path: root/jekyll-hook.js
diff options
context:
space:
mode:
Diffstat (limited to 'jekyll-hook.js')
-rwxr-xr-xjekyll-hook.js18
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); });
+ }
}
}