🎉 able to send email message now

This commit is contained in:
Song
2021-01-31 15:30:22 +08:00
parent a046b0aea9
commit 63e8bd8744
10 changed files with 125 additions and 11 deletions
+6
View File
@@ -112,6 +112,9 @@ router.post('/configure', userRequired, async (req, res, next) => {
wechatTemplateId: req.body.wechatTemplateId,
wechatOpenId: req.body.wechatOpenId,
wechatVerifyToken: req.body.wechatVerifyToken,
smtpServer: req.body.smtpServer,
smtpUser: req.body.smtpUser,
smtpPass: req.body.smtpPass,
};
for (let field in user) {
let value = user[field];
@@ -140,6 +143,9 @@ router.post('/configure', userRequired, async (req, res, next) => {
wechatOpenId: userObj.wechatOpenId,
wechatVerifyToken: userObj.wechatVerifyToken,
token: await requestToken(userObj.wechatAppId, userObj.wechatAppSecret),
smtpServer: userObj.smtpServer,
smtpUser: userObj.smtpUser,
smtpPass: userObj.smtpPass,
});
message = '配置更新成功';
console.debug(tokenStore);