itizawa 6 lat temu
rodzic
commit
7173a06215
1 zmienionych plików z 5 dodań i 1 usunięć
  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) => {