itizawa пре 6 година
родитељ
комит
7173a06215
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/server/models/user.js

+ 5 - 1
src/server/models/user.js

@@ -666,8 +666,12 @@ module.exports = function(crowi) {
   };
 
   userSchema.statics.sendEmailbyUserList = async function(userList) {
-
     const mailer = crowi.getMailer();
+
+    if (mailer == null) {
+      return debug('mailer setup is required');
+    }
+
     const appTitle = crowi.appService.getAppTitle();
 
     await Promise.all(userList.map(async(user) => {