yusuketk 5 лет назад
Родитель
Сommit
dfb88b8b2a
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/server/routes/apiv3/app-settings.js

+ 3 - 3
src/server/routes/apiv3/app-settings.js

@@ -313,7 +313,7 @@ module.exports = (crowi) => {
   /**
    * validate mail setting send test mail
    */
-  async function sendTestEmail(user) {
+  async function sendTestEmail(destinationAddress) {
 
     const { configManager, mailService } = crowi;
 
@@ -350,7 +350,7 @@ module.exports = (crowi) => {
 
     const mailOptions = {
       from: fromAddress,
-      to: user.email,
+      to: destinationAddress,
       subject: 'Wiki管理設定のアップデートによるメール通知',
       text: 'このメールは、WikiのSMTP設定のアップデートにより送信されています。',
     };
@@ -473,7 +473,7 @@ module.exports = (crowi) => {
    */
   router.get('/smtp-test', loginRequiredStrictly, adminRequired, async(req, res) => {
     try {
-      await sendTestEmail(req.user);
+      await sendTestEmail(req.user.email);
       return res.apiv3({});
     }
     catch (err) {