mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-07-10 23:11:21 +08:00
feat(services): 新增标准 IMAP 邮箱服务支持(Gmail/QQ/163等)
- 新增 EmailServiceType.IMAP_MAIL 枚举值和默认配置 - 新建 ImapMailService(imaplib 标准库,强制直连) - 注册路由新增 imap_mail 分支和 available-services 键 - 邮箱服务路由新增 imap_mail stats 统计和类型描述 - accounts 路由 _build_inbox_config 支持 imap_mail - 前端表单/列表/编辑完整支持 IMAP 子类型 - 无新增依赖
This commit is contained in:
@@ -211,6 +211,7 @@
|
||||
<option value="tempmail">TempMail(自部署 Cloudflare Worker)</option>
|
||||
<option value="duckmail">DuckMail(DuckMail API)</option>
|
||||
<option value="freemail">Freemail(自部署 Cloudflare Worker)</option>
|
||||
<option value="imap">标准 IMAP(Gmail/QQ/163等)</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- MoeMail 字段 -->
|
||||
@@ -277,6 +278,35 @@
|
||||
<input type="text" id="custom-fm-domain" name="fm_domain" placeholder="example.com">
|
||||
</div>
|
||||
</div>
|
||||
<!-- IMAP 字段 -->
|
||||
<div id="add-imap-fields" style="display:none;">
|
||||
<div class="form-group">
|
||||
<label for="custom-imap-host">IMAP 服务器</label>
|
||||
<input type="text" id="custom-imap-host" name="imap_host" placeholder="imap.gmail.com / imap.qq.com / imap.163.com">
|
||||
<small style="color: var(--text-muted);">Gmail: imap.gmail.com | QQ: imap.qq.com | 163: imap.163.com</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="custom-imap-port">端口</label>
|
||||
<input type="number" id="custom-imap-port" name="imap_port" value="993" min="1" max="65535">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="custom-imap-use-ssl">加密方式</label>
|
||||
<select id="custom-imap-use-ssl" name="imap_use_ssl">
|
||||
<option value="true">SSL(端口 993)</option>
|
||||
<option value="false">STARTTLS(端口 143)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="custom-imap-email">邮箱地址</label>
|
||||
<input type="email" id="custom-imap-email" name="imap_email" placeholder="your@gmail.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="custom-imap-password">密码 / 授权码</label>
|
||||
<input type="password" id="custom-imap-password" name="imap_password" placeholder="Gmail 需使用 App Password,QQ/163 需使用授权码">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="custom-priority">优先级</label>
|
||||
@@ -386,6 +416,35 @@
|
||||
<input type="text" id="edit-fm-domain" name="fm_domain" placeholder="example.com">
|
||||
</div>
|
||||
</div>
|
||||
<!-- IMAP 字段 -->
|
||||
<div id="edit-imap-fields" style="display:none;">
|
||||
<div class="form-group">
|
||||
<label for="edit-imap-host">IMAP 服务器</label>
|
||||
<input type="text" id="edit-imap-host" name="imap_host" placeholder="imap.gmail.com">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="edit-imap-port">端口</label>
|
||||
<input type="number" id="edit-imap-port" name="imap_port" value="993" min="1" max="65535">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit-imap-use-ssl">加密方式</label>
|
||||
<select id="edit-imap-use-ssl" name="imap_use_ssl">
|
||||
<option value="true">SSL(端口 993)</option>
|
||||
<option value="false">STARTTLS(端口 143)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit-imap-email">邮箱地址</label>
|
||||
<input type="email" id="edit-imap-email" name="imap_email" placeholder="your@gmail.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit-imap-password">密码 / 授权码</label>
|
||||
<input type="password" id="edit-imap-password" name="imap_password" placeholder="留空则保持原值不变">
|
||||
<small style="color: var(--text-muted);">留空则保持原值不变</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="edit-custom-priority">优先级</label>
|
||||
|
||||
@@ -181,6 +181,7 @@
|
||||
<option value="moe_mail">MoeMail</option>
|
||||
<option value="temp_mail">Temp-Mail 自部署</option>
|
||||
<option value="duck_mail">DuckMail</option>
|
||||
<option value="imap_mail">IMAP 邮箱</option>
|
||||
<option value="outlook_batch:all">Outlook 批量注册</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user