feat: 接入 SMTP,支持后台配置、注册邮箱验证与密码找回
新增邮件能力,配置入口在管理后台「邮件设置」,无需改环境变量或重启。 一、邮件发送模块(lib/mailer.js) 基于 nodemailer 封装。SMTP 配置存在 settings 表(key 前缀 smtp_), 按需构建 transporter 并做短时缓存,配置变更时失效重建。 把底层 SMTP 异常翻译成可读中文提示(认证失败 / 无法连接 / 端口或 加密方式不匹配等),便于管理员自行排查。 二、管理后台「邮件设置」面板 - 服务器、端口、加密方式(STARTTLS 587 / SSL 465)、用户名、 发件人名称与邮箱 - 密码只写不读:任何接口都不回显明文,仅返回 password_set 布尔值。 留空表示保持原密码,避免管理员只改端口就把密码清掉 - 「发送测试邮件」按钮验证连通性,默认发给当前管理员 - 「注册邮箱验证」开关:仅在 SMTP 配置完整时才允许开启,避免开启后 所有人都注册不了 三、注册邮箱验证 - 新增 email_verifications 表存验证码。只存 sha256 摘要,不存明文; 同一邮箱+用途同时只允许一条有效记录(唯一索引约束) - 验证码 6 位数字,10 分钟有效,失败累计 5 次即作废; 校验用 timingSafeEqual 做定时安全比较 - 校验放在所有格式校验之后,避免用户因格式错误白白消耗一次验证码 - 验证码一次性,校验通过即标记 consumed - 注册框新增验证码输入与「获取验证码」按钮(含 60 秒倒计时) - 该字段仅在站点开启邮箱验证且 SMTP 可用时显示, 与既有的管理员引导令牌字段处理方式一致 四、密码找回邮件 新增 /api/auth/forgot-password 与 /api/auth/reset-password-by-email, 与既有恢复码机制并行。邮箱不存在时返回与成功一致的响应,避免被用于 枚举注册用户。重置成功后递增 token_version 使旧令牌失效。 五、安全与限流 - 新增 mailLimiter:发信接口 15 分钟 5 次,防止被当作垃圾邮件发射器 - SMTP 配置接口需管理员权限(未登录 401、普通用户 403),实测通过 六、顺带修复 - schema.sql 补上 email_verifications 表、users.email_verified 列与 SMTP 设置项。此前只改了 migrations/ 而漏了 schema.sql,被 test/schema-parity.test.js 抓出——这正是当初加该测试的目的。 - 管理后台原有一条 `#adminContent > div:first-of-type` 的 !important flex 规则,依赖「第一个 div 即论坛名称区域」这一脆弱假设,新增的 邮件设置面板正好撞上导致布局错乱。改为显式的 .forum-name-form 类名。 - 全局输入框规则补上 padding 兜底,否则管理后台的输入框会塌陷成 17px。 - multer 2.2.0 -> 2.4.0,修复多个 DoS 与上传限制绕过漏洞 (GHSA-wc9g-mqfw-jrwm 等)。test/app.test.js 中原本断言 multer 必须 匹配 /^2\.2\./,会阻碍安全升级,改为断言不低于已修复的 2.3.0。 - i18n 补充 39 条新文案(zh 与 en 各一份)。 已用本地 SMTP 捕获服务器完成端到端验证:测试邮件真实送达、验证码 正确与错误分支、验证码一次性、密码重置生效且旧密码失效、防用户枚举、 权限控制(401/403)、密码不回显、SMTP 未就绪时拒绝开启验证。 完整测试套件 25/25 通过。
This commit is contained in:
1 parent
75cc78d5f8
commit
627d284b02
13 files changed
+1285
-90
No files matched your search
+175
-4
@@ -431,11 +431,11 @@ function renderAdminSettings() {
|
||||
container.innerHTML = `
|
||||
<h3 style="margin-bottom:16px;text-align:center;">${getIcon('settings')} 论坛名称</h3>
|
||||
|
||||
<div style="max-width:400px;margin:0 auto;width:100%;">
|
||||
<label style="font-weight:600;font-size:14px;display:block;margin-bottom:6px;">论坛名称</label>
|
||||
<input type="text" id="settingsForumName" style="width:100%;padding:10px 14px;border:1.5px solid #e2e8f0;border-radius:6px;font-size:15px;margin-bottom:12px;font-family:inherit;background:var(--bg);color:var(--text);" />
|
||||
<div class="forum-name-form">
|
||||
<label for="settingsForumName" style="font-weight:600;font-size:14px;display:block;margin-bottom:6px;width:100%;">论坛名称</label>
|
||||
<input type="text" id="settingsForumName" placeholder="论坛名称" />
|
||||
<button id="settingsForumSave" class="btn-primary" style="padding:10px 24px;">保存</button>
|
||||
<span id="settingsResult" style="margin-left:12px;font-size:14px;"></span>
|
||||
<span id="settingsResult" style="font-size:14px;"></span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -461,6 +461,176 @@ function renderAdminSettings() {
|
||||
});
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 📧 邮件设置(SMTP)
|
||||
// ============================================================
|
||||
|
||||
function renderAdminSmtp() {
|
||||
const container = document.getElementById('adminContent');
|
||||
container.innerHTML = `
|
||||
<h3 style="margin-bottom:6px;text-align:center;">${getIcon('message')} 邮件设置</h3>
|
||||
<p style="text-align:center;color:var(--text-secondary);font-size:13px;margin-bottom:20px;">
|
||||
配置后可用于注册邮箱验证与密码找回。密码只写不读,保存后不会回显。
|
||||
</p>
|
||||
|
||||
<div class="smtp-form">
|
||||
<div id="smtpStatus" style="margin-bottom:16px;padding:10px 14px;border-radius:var(--radius-sm);font-size:13px;"></div>
|
||||
|
||||
<label class="smtp-check">
|
||||
<input type="checkbox" id="smtpEnabled" />
|
||||
启用邮件发送
|
||||
</label>
|
||||
|
||||
<label for="smtpHost">SMTP 服务器</label>
|
||||
<input type="text" id="smtpHost" placeholder="smtp.example.com" autocomplete="off" />
|
||||
|
||||
<div class="smtp-row">
|
||||
<div>
|
||||
<label for="smtpPort">端口</label>
|
||||
<input type="number" id="smtpPort" placeholder="587" min="1" max="65535" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="smtpSecure">加密方式</label>
|
||||
<select id="smtpSecure">
|
||||
<option value="false">STARTTLS(587)</option>
|
||||
<option value="true">SSL/TLS(465)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="smtpUser">用户名</label>
|
||||
<input type="text" id="smtpUser" placeholder="通常为完整邮箱地址" autocomplete="off" />
|
||||
|
||||
<label for="smtpPassword">密码 / 授权码</label>
|
||||
<input type="password" id="smtpPassword" placeholder="留空表示不修改已保存的密码" autocomplete="new-password" />
|
||||
<div class="smtp-hint">QQ、163 等邮箱需填写「授权码」而非登录密码。</div>
|
||||
|
||||
<label for="smtpFromName">发件人名称</label>
|
||||
<input type="text" id="smtpFromName" placeholder="例如:论坛名称" />
|
||||
|
||||
<label for="smtpFromEmail">发件人邮箱 <span style="color:#ef4444;">*</span></label>
|
||||
<input type="email" id="smtpFromEmail" placeholder="noreply@example.com" />
|
||||
|
||||
<div class="smtp-actions">
|
||||
<button id="smtpSaveBtn" class="btn-primary" style="padding:10px 22px;">保存配置</button>
|
||||
<button id="smtpTestBtn" class="btn-secondary" style="padding:10px 22px;">发送测试邮件</button>
|
||||
<button id="smtpClearPwBtn" class="btn-secondary" style="padding:10px 22px;">清除密码</button>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h4 style="font-size:15px;margin-bottom:6px;">注册邮箱验证</h4>
|
||||
<p style="font-size:13px;color:var(--text-secondary);margin-bottom:12px;">
|
||||
开启后,新用户注册必须填写邮箱收到的验证码。需先完成上方配置并确保测试邮件可送达。
|
||||
</p>
|
||||
<label class="smtp-check" style="margin-bottom:0;">
|
||||
<input type="checkbox" id="emailVerifyRequired" />
|
||||
要求注册时验证邮箱
|
||||
</label>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const $ = id => document.getElementById(id);
|
||||
|
||||
// 载入现有配置
|
||||
API.getSmtpConfig().then(cfg => {
|
||||
$('smtpEnabled').checked = cfg.enabled;
|
||||
$('smtpHost').value = cfg.host || '';
|
||||
$('smtpPort').value = cfg.port || 587;
|
||||
$('smtpSecure').value = String(cfg.secure);
|
||||
$('smtpUser').value = cfg.user || '';
|
||||
$('smtpFromName').value = cfg.from_name || '';
|
||||
$('smtpFromEmail').value = cfg.from_email || '';
|
||||
// 密码永不回显,只用占位文字提示是否已设置
|
||||
$('smtpPassword').placeholder = cfg.password_set
|
||||
? '已保存密码,留空则不修改'
|
||||
: '尚未设置密码';
|
||||
|
||||
const status = $('smtpStatus');
|
||||
if (cfg.configured) {
|
||||
status.innerHTML = `${getIcon('success')} 配置完整,可以发信`;
|
||||
status.style.background = 'rgba(34,197,94,0.12)';
|
||||
status.style.color = '#16a34a';
|
||||
} else {
|
||||
status.innerHTML = `${getIcon('warning')} 尚未配置完成,邮件功能不可用`;
|
||||
status.style.background = 'rgba(245,158,11,0.12)';
|
||||
status.style.color = '#d97706';
|
||||
}
|
||||
}).catch(err => {
|
||||
showToast('加载配置失败:' + err.message, 'error');
|
||||
});
|
||||
|
||||
// 读取邮箱验证开关(该值在公开设置接口中)
|
||||
API.getSettings().then(s => {
|
||||
$('emailVerifyRequired').checked = s.email_verify_required === true;
|
||||
}).catch(() => {});
|
||||
|
||||
$('smtpSaveBtn').addEventListener('click', async () => {
|
||||
const payload = {
|
||||
enabled: $('smtpEnabled').checked,
|
||||
host: $('smtpHost').value.trim(),
|
||||
port: Number($('smtpPort').value || 587),
|
||||
secure: $('smtpSecure').value === 'true',
|
||||
user: $('smtpUser').value.trim(),
|
||||
from_name: $('smtpFromName').value.trim(),
|
||||
from_email: $('smtpFromEmail').value.trim(),
|
||||
};
|
||||
// 只有填了才提交,避免把已保存的密码覆盖成空
|
||||
const pw = $('smtpPassword').value;
|
||||
if (pw) payload.password = pw;
|
||||
|
||||
try {
|
||||
await API.saveSmtpConfig(payload);
|
||||
$('smtpPassword').value = '';
|
||||
showToast('配置已保存', 'success');
|
||||
renderAdminSmtp();
|
||||
} catch (err) {
|
||||
showToast(err.message, 'error');
|
||||
}
|
||||
});
|
||||
|
||||
$('smtpTestBtn').addEventListener('click', async function() {
|
||||
const btn = this;
|
||||
btn.disabled = true;
|
||||
btn.textContent = '发送中…';
|
||||
try {
|
||||
const r = await API.sendTestMail();
|
||||
showToast('测试邮件已发送至 ' + r.to, 'success');
|
||||
} catch (err) {
|
||||
showToast(err.message, 'error');
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
btn.textContent = '发送测试邮件';
|
||||
}
|
||||
});
|
||||
|
||||
$('smtpClearPwBtn').addEventListener('click', async () => {
|
||||
const ok = await showConfirm('确定要清除已保存的 SMTP 密码吗?', {
|
||||
title: '清除密码', confirmText: '清除', danger: true,
|
||||
});
|
||||
if (!ok) return;
|
||||
try {
|
||||
await API.clearSmtpPassword();
|
||||
showToast('密码已清除', 'success');
|
||||
renderAdminSmtp();
|
||||
} catch (err) {
|
||||
showToast(err.message, 'error');
|
||||
}
|
||||
});
|
||||
|
||||
$('emailVerifyRequired').addEventListener('change', async function() {
|
||||
const desired = this.checked;
|
||||
try {
|
||||
await API.setEmailVerifyRequired(desired);
|
||||
showToast(desired ? '已开启注册邮箱验证' : '已关闭注册邮箱验证', 'success');
|
||||
} catch (err) {
|
||||
// 失败时把开关状态回滚,避免界面与服务端不一致
|
||||
this.checked = !desired;
|
||||
showToast(err.message, 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 🎨 自定义 CSS(独立标签页)- 已改用 Toast 提示
|
||||
// ============================================================
|
||||
@@ -834,6 +1004,7 @@ document.querySelector('.admin-nav')?.addEventListener('click', function(e) {
|
||||
links: renderAdminLinks,
|
||||
'custom-css': renderAdminCustomCSS,
|
||||
settings: renderAdminSettings,
|
||||
smtp: renderAdminSmtp,
|
||||
custom: renderAdminCustomPages
|
||||
};
|
||||
if (tabMap[tab]) tabMap[tab]();
|
||||
|
||||
@@ -37,10 +37,16 @@ const API = {
|
||||
return data;
|
||||
},
|
||||
|
||||
async register(email, password, username, bootstrapToken = '') {
|
||||
async register(email, password, username, bootstrapToken = '', emailCode = '') {
|
||||
const data = await apiFetch('/auth/register', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ email, password, username, bootstrap_token: bootstrapToken || undefined })
|
||||
body: JSON.stringify({
|
||||
email,
|
||||
password,
|
||||
username,
|
||||
bootstrap_token: bootstrapToken || undefined,
|
||||
email_code: emailCode || undefined
|
||||
})
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
@@ -442,5 +448,80 @@ const API = {
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
// ============================================================
|
||||
// SMTP 配置(管理员)
|
||||
// ============================================================
|
||||
|
||||
async getSmtpConfig() {
|
||||
const data = await apiFetch('/admin/smtp');
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
// password 留空表示保持原有密码不变
|
||||
async saveSmtpConfig(config) {
|
||||
const data = await apiFetch('/admin/smtp', {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(config)
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
async clearSmtpPassword() {
|
||||
const data = await apiFetch('/admin/smtp/password', { method: 'DELETE' });
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
async sendTestMail(to) {
|
||||
const data = await apiFetch('/admin/smtp/test', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(to ? { to } : {})
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
async setEmailVerifyRequired(required) {
|
||||
const data = await apiFetch('/admin/email-verify', {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ required })
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
// ============================================================
|
||||
// 邮箱验证码
|
||||
// ============================================================
|
||||
|
||||
async sendRegisterCode(email) {
|
||||
const data = await apiFetch('/auth/send-code', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ email })
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
async forgotPassword(email) {
|
||||
const data = await apiFetch('/auth/forgot-password', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ email })
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
},
|
||||
|
||||
async resetPasswordByEmail(email, code, newPassword) {
|
||||
const data = await apiFetch('/auth/reset-password-by-email', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ email, code, newPassword })
|
||||
});
|
||||
if (data.error) throw new Error(data.error);
|
||||
return data;
|
||||
}
|
||||
};
|
||||
+60
-1
@@ -35,9 +35,60 @@ document.getElementById('loginSubmit').addEventListener('click', async () => {
|
||||
document.getElementById('registerBtn').addEventListener('click', () => {
|
||||
refreshCaptcha('reg');
|
||||
syncBootstrapTokenField();
|
||||
syncEmailCodeField();
|
||||
document.getElementById('registerModal').classList.add('active');
|
||||
});
|
||||
|
||||
// 邮箱验证码字段:仅在站点开启邮箱验证且 SMTP 可用时显示
|
||||
async function syncEmailCodeField() {
|
||||
const row = document.getElementById('regEmailCodeRow');
|
||||
const field = document.getElementById('regEmailCode');
|
||||
if (!row || !field) return;
|
||||
try {
|
||||
const settings = await API.getSettings();
|
||||
const required = settings.email_verify_required === true;
|
||||
row.style.display = required ? '' : 'none';
|
||||
if (!required) field.value = '';
|
||||
} catch (err) {
|
||||
// 取不到设置时按「不需要」处理,避免用户卡在无法完成的注册流程上
|
||||
row.style.display = 'none';
|
||||
field.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
// 发送邮箱验证码,含 60 秒倒计时防止连点
|
||||
(function bindSendCodeButton() {
|
||||
const btn = document.getElementById('regSendCodeBtn');
|
||||
if (!btn) return;
|
||||
|
||||
btn.addEventListener('click', async () => {
|
||||
const email = document.getElementById('regEmail').value.trim();
|
||||
if (!email) { showToast('请先填写邮箱', 'warning'); return; }
|
||||
|
||||
btn.disabled = true;
|
||||
try {
|
||||
await API.sendRegisterCode(email);
|
||||
showToast('验证码已发送,请查收邮件', 'success');
|
||||
|
||||
let remain = 60;
|
||||
btn.textContent = remain + 's';
|
||||
const timer = setInterval(() => {
|
||||
remain -= 1;
|
||||
if (remain <= 0) {
|
||||
clearInterval(timer);
|
||||
btn.disabled = false;
|
||||
btn.textContent = '获取验证码';
|
||||
} else {
|
||||
btn.textContent = remain + 's';
|
||||
}
|
||||
}, 1000);
|
||||
} catch (err) {
|
||||
btn.disabled = false;
|
||||
showToast(err.message, 'error');
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
// 管理员初始化令牌输入框仅在首次部署且配置了引导令牌时出现。
|
||||
// 其余情况(普通部署、已初始化完成)普通用户完全看不到它。
|
||||
async function syncBootstrapTokenField() {
|
||||
@@ -64,13 +115,20 @@ document.getElementById('registerSubmit').addEventListener('click', async () =>
|
||||
const bootstrapToken = bootstrapField && bootstrapField.style.display !== 'none'
|
||||
? bootstrapField.value.trim()
|
||||
: '';
|
||||
const codeField = document.getElementById('regEmailCode');
|
||||
const emailCode = codeField && codeField.style.display !== 'none'
|
||||
? codeField.value.trim()
|
||||
: '';
|
||||
const captchaInput = document.getElementById('regCaptchaInput').value.trim();
|
||||
const captchaAnswer = parseInt(document.getElementById('regCaptchaInput').dataset.answer);
|
||||
if (!username || !email || !password) { showToast('请填写完整信息', 'warning'); return; }
|
||||
if (password.length < 6) { showToast('密码至少6位', 'warning'); return; }
|
||||
if (codeField && codeField.style.display !== 'none' && !emailCode) {
|
||||
showToast('请输入邮箱验证码', 'warning'); return;
|
||||
}
|
||||
if (parseInt(captchaInput) !== captchaAnswer) { showToast('验证码错误,请重新计算', 'error'); refreshCaptcha('reg'); return; }
|
||||
try {
|
||||
await API.register(email, password, username, bootstrapToken);
|
||||
await API.register(email, password, username, bootstrapToken, emailCode);
|
||||
} catch (err) {
|
||||
showToast('注册失败:' + err.message, 'error');
|
||||
return;
|
||||
@@ -81,6 +139,7 @@ document.getElementById('registerSubmit').addEventListener('click', async () =>
|
||||
document.getElementById('regEmail').value = '';
|
||||
document.getElementById('regPassword').value = '';
|
||||
if (bootstrapField) bootstrapField.value = '';
|
||||
if (codeField) codeField.value = '';
|
||||
document.getElementById('regCaptchaInput').value = '';
|
||||
|
||||
try {
|
||||
|
||||
+82
@@ -371,6 +371,47 @@ const TRANSLATIONS = {
|
||||
'修改用户角色': '修改用户角色',
|
||||
'重新生成恢复码': '重新生成恢复码',
|
||||
'退出登录': '退出登录',
|
||||
|
||||
// ===== SMTP 与邮箱验证 =====
|
||||
'邮件设置': '邮件设置',
|
||||
'启用邮件发送': '启用邮件发送',
|
||||
'SMTP 服务器': 'SMTP 服务器',
|
||||
'端口': '端口',
|
||||
'加密方式': '加密方式',
|
||||
'密码 / 授权码': '密码 / 授权码',
|
||||
'发件人名称': '发件人名称',
|
||||
'发件人邮箱': '发件人邮箱',
|
||||
'保存配置': '保存配置',
|
||||
'发送测试邮件': '发送测试邮件',
|
||||
'清除密码': '清除密码',
|
||||
'注册邮箱验证': '注册邮箱验证',
|
||||
'要求注册时验证邮箱': '要求注册时验证邮箱',
|
||||
'获取验证码': '获取验证码',
|
||||
'邮箱验证码': '邮箱验证码',
|
||||
'配置完整,可以发信': '配置完整,可以发信',
|
||||
'尚未配置完成,邮件功能不可用': '尚未配置完成,邮件功能不可用',
|
||||
'验证码已发送,请查收邮件': '验证码已发送,请查收邮件',
|
||||
'请输入邮箱验证码': '请输入邮箱验证码',
|
||||
'请输入有效邮箱': '请输入有效邮箱',
|
||||
'该邮箱已被注册': '该邮箱已被注册',
|
||||
'本站未开启邮箱验证': '本站未开启邮箱验证',
|
||||
'请先获取验证码': '请先获取验证码',
|
||||
'验证码已过期,请重新获取': '验证码已过期,请重新获取',
|
||||
'尝试次数过多,请重新获取验证码': '尝试次数过多,请重新获取验证码',
|
||||
'验证码错误': '验证码错误',
|
||||
'配置已保存': '配置已保存',
|
||||
'密码已清除': '密码已清除',
|
||||
'已开启注册邮箱验证': '已开启注册邮箱验证',
|
||||
'已关闭注册邮箱验证': '已关闭注册邮箱验证',
|
||||
'加载配置失败:': '加载配置失败:',
|
||||
'已保存密码,留空则不修改': '已保存密码,留空则不修改',
|
||||
'尚未设置密码': '尚未设置密码',
|
||||
'留空表示不修改已保存的密码': '留空表示不修改已保存的密码',
|
||||
'通常为完整邮箱地址': '通常为完整邮箱地址',
|
||||
'例如:论坛名称': '例如:论坛名称',
|
||||
'注册验证码': '注册验证码',
|
||||
'密码重置验证码': '密码重置验证码',
|
||||
'Forumlify SMTP 测试邮件': 'Forumlify SMTP 测试邮件',
|
||||
},
|
||||
|
||||
'en': {
|
||||
@@ -740,6 +781,47 @@ const TRANSLATIONS = {
|
||||
'修改用户角色': 'Change User Role',
|
||||
'重新生成恢复码': 'Regenerate Recovery Codes',
|
||||
'退出登录': 'Logout',
|
||||
|
||||
// ===== SMTP 与邮箱验证 =====
|
||||
'邮件设置': 'Email Settings',
|
||||
'启用邮件发送': 'Enable email sending',
|
||||
'SMTP 服务器': 'SMTP Server',
|
||||
'端口': 'Port',
|
||||
'加密方式': 'Encryption',
|
||||
'密码 / 授权码': 'Password / App Password',
|
||||
'发件人名称': 'Sender Name',
|
||||
'发件人邮箱': 'Sender Email',
|
||||
'保存配置': 'Save Settings',
|
||||
'发送测试邮件': 'Send Test Email',
|
||||
'清除密码': 'Clear Password',
|
||||
'注册邮箱验证': 'Email Verification on Signup',
|
||||
'要求注册时验证邮箱': 'Require email verification on signup',
|
||||
'获取验证码': 'Get Code',
|
||||
'邮箱验证码': 'Email Code',
|
||||
'配置完整,可以发信': 'Configuration complete, email is ready',
|
||||
'尚未配置完成,邮件功能不可用': 'Configuration incomplete, email is unavailable',
|
||||
'验证码已发送,请查收邮件': 'Verification code sent, please check your inbox',
|
||||
'请输入邮箱验证码': 'Please enter the email verification code',
|
||||
'请输入有效邮箱': 'Please enter a valid email address',
|
||||
'该邮箱已被注册': 'This email is already registered',
|
||||
'本站未开启邮箱验证': 'Email verification is not enabled on this site',
|
||||
'请先获取验证码': 'Please request a verification code first',
|
||||
'验证码已过期,请重新获取': 'The code has expired, please request a new one',
|
||||
'尝试次数过多,请重新获取验证码': 'Too many attempts, please request a new code',
|
||||
'验证码错误': 'Incorrect verification code',
|
||||
'配置已保存': 'Settings saved',
|
||||
'密码已清除': 'Password cleared',
|
||||
'已开启注册邮箱验证': 'Email verification on signup enabled',
|
||||
'已关闭注册邮箱验证': 'Email verification on signup disabled',
|
||||
'加载配置失败:': 'Failed to load settings: ',
|
||||
'已保存密码,留空则不修改': 'Password saved, leave blank to keep it',
|
||||
'尚未设置密码': 'No password set yet',
|
||||
'留空表示不修改已保存的密码': 'Leave blank to keep the saved password',
|
||||
'通常为完整邮箱地址': 'Usually your full email address',
|
||||
'例如:论坛名称': 'e.g. Forum name',
|
||||
'注册验证码': 'Signup verification code',
|
||||
'密码重置验证码': 'Password reset code',
|
||||
'Forumlify SMTP 测试邮件': 'Forumlify SMTP test email',
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user