log content contains config name

This commit is contained in:
Zichao Lin 2023-10-20 23:04:16 +08:00
parent 6bcb19e8e1
commit 41280019f6
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB
2 changed files with 6 additions and 4 deletions

@ -166,7 +166,7 @@ exports.SendLog = function (
);
};
exports.SendResult = function (transporter, mailfrom, mailto, content) {
exports.SendResult = function (transporter, mailfrom, mailto, content, key) {
transporter.sendMail(
{
from: `"Genshin Cloud Game Helper" <${mailfrom}>`, //邮件来源
@ -178,7 +178,7 @@ exports.SendResult = function (transporter, mailfrom, mailto, content) {
if (error) {
return console.log(error);
}
log.info(`已发送通知至${mailto}`);
log.info(`${key} - 已发送通知至${mailto}`);
}
);
};

@ -70,7 +70,8 @@ const nodemailer = require("nodemailer");
transporter,
globalConfig.mailConfig.user,
configs[key].email,
`签到完毕! 获得时长:${WalletRespond.data.free_time.send_freetime}分钟,总时长:${WalletRespond.data.free_time.free_time}分钟`
`签到完毕! 获得时长:${WalletRespond.data.free_time.send_freetime}分钟,总时长:${WalletRespond.data.free_time.free_time}分钟`,
key
);
}
let NotificationLength = NotificationRespond.data.list.length;
@ -92,7 +93,8 @@ const nodemailer = require("nodemailer");
transporter,
globalConfig.mailConfig.user,
configs[key].email,
"签到失败"
"签到失败",
key
);
}
}