|
|
@@ -35,7 +35,15 @@ class GlobalNotification {
|
|
|
}
|
|
|
|
|
|
notifyByMail(notification, mailOption) {
|
|
|
- mailer.send(Object.assign(mailOption, {to: notification.toEmail}));
|
|
|
+ const crowi = this.crowi;
|
|
|
+ const mailer = crowi.getMailer();
|
|
|
+
|
|
|
+ mailer.send(Object.assign(mailOption, {to: notification.toEmail}),
|
|
|
+ function(err, s) {
|
|
|
+ debug('completed to send email: ', err, s);
|
|
|
+ next();
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
notifyBySlack(notification, slackOption) {
|
|
|
@@ -85,7 +93,7 @@ class GlobalNotification {
|
|
|
const option = {
|
|
|
mail: {
|
|
|
subject: `#pageEdit - ${page.creator.username} edited ${page.path}`,
|
|
|
- template: path.join(this.crowi.localeDir, lang, 'notifications/pageEdit.txt'),
|
|
|
+ template: `../../locales/${lang}/notifications/pageEdit.txt`,
|
|
|
vars: {}
|
|
|
},
|
|
|
slack: {},
|