feat(mail): 添加收件箱功能,自动获得验证码

This commit is contained in:
cnlimiter
2026-03-20 12:54:39 +08:00
parent 87ff48cdaf
commit b1a8d02353
16 changed files with 186 additions and 44 deletions

View File

@@ -4,7 +4,7 @@
// 状态
let outlookServices = [];
let customServices = []; // 合并 custom_domain + temp_mail + duck_mail
let customServices = []; // 合并 moe_mail + temp_mail + duck_mail
let selectedOutlook = new Set();
let selectedCustom = new Set();
@@ -293,11 +293,11 @@ function getCustomServiceAddress(service) {
return `${escapeHtml(baseUrl)}<div style="color: var(--text-muted); margin-top: 4px;">默认域名:@${escapeHtml(domain)}</div>`;
}
// 加载自定义邮箱服务(custom_domain + temp_mail + duck_mail + freemail 合并)
// 加载自定义邮箱服务(moe_mail + temp_mail + duck_mail + freemail 合并)
async function loadCustomServices() {
try {
const [r1, r2, r3, r4] = await Promise.all([
api.get('/email-services?service_type=custom_domain'),
api.get('/email-services?service_type=moe_mail'),
api.get('/email-services?service_type=temp_mail'),
api.get('/email-services?service_type=duck_mail'),
api.get('/email-services?service_type=freemail')
@@ -422,7 +422,7 @@ async function handleAddCustom(e) {
let serviceType, config;
if (subType === 'moemail') {
serviceType = 'custom_domain';
serviceType = 'moe_mail';
config = {
base_url: formData.get('api_url'),
api_key: formData.get('api_key'),