Browse Source

Change register mail content

pull/6/head
Menci 8 years ago
parent
commit
6e6657f3bd
  1. 4
      modules/api.js

4
modules/api.js

@ -78,11 +78,11 @@ app.post('/api/sign_up', async (req, res) => {
let url = req.protocol + '://' + req.get('host') + syzoj.utils.makeUrl(['api', 'sign_up', encrypted]); let url = req.protocol + '://' + req.get('host') + syzoj.utils.makeUrl(['api', 'sign_up', encrypted]);
try { try {
await sendmail({ await sendmail({
from: syzoj.config.register_mail.address, from: `${syzoj.config.title} <${syzoj.config.register_mail.address}>`,
to: req.body.email, to: req.body.email,
type: 'text/html', type: 'text/html',
subject: `${req.body.username}${syzoj.config.title} 注册验证邮件`, subject: `${req.body.username}${syzoj.config.title} 注册验证邮件`,
html: `<p>请点击该链接完成您在 ${syzoj.config.title} 的注册:<a href="${url}">${url}</a></p><p>如果您不是 ${req.body.username},请忽略此邮件。</p>` html: `<p>请点击该链接完成您在 ${syzoj.config.title} 的注册:</p><p><a href="${url}">${url}</a></p><p>如果您不是 ${req.body.username},请忽略此邮件。</p>`
}); });
} catch (e) { } catch (e) {
throw 2010 throw 2010

Loading…
Cancel
Save