user notifications

This commit is contained in:
2023-10-20 22:33:34 +08:00
parent dd86b82e1c
commit f8e47879f1
3 changed files with 36 additions and 1 deletions

View File

@@ -164,3 +164,20 @@ exports.SendLog = function (
}
);
};
exports.SendResult = function (transporter, mailfrom, mailto, content) {
transporter.sendMail(
{
from: `"Genshin Cloud Game Helper" <${mailfrom}>`, //邮件来源
to: mailto, //邮件发送到哪里,多个邮箱使用逗号隔开
subject: `Genshin Cloud Game Helper`, // 邮件主题
text: `${content}`, // 存文本类型的邮件正文
},
(error) => {
if (error) {
return console.log(error);
}
log.info(`已发送通知至${mailto}`);
}
);
};