mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-08-14 17:04:08 +08:00
feat(mail): 添加收件箱功能,自动获得验证码
This commit is contained in:
@@ -33,7 +33,7 @@ class EmailServiceType(str, Enum):
|
||||
"""邮箱服务类型"""
|
||||
TEMPMAIL = "tempmail"
|
||||
OUTLOOK = "outlook"
|
||||
CUSTOM_DOMAIN = "custom_domain"
|
||||
MOE_MAIL = "moe_mail"
|
||||
TEMP_MAIL = "temp_mail"
|
||||
DUCK_MAIL = "duck_mail"
|
||||
FREEMAIL = "freemail"
|
||||
@@ -109,7 +109,7 @@ EMAIL_SERVICE_DEFAULTS = {
|
||||
"smtp_port": 587,
|
||||
"timeout": 30,
|
||||
},
|
||||
"custom_domain": {
|
||||
"moe_mail": {
|
||||
"base_url": "", # 需要用户配置
|
||||
"api_key_header": "X-API-Key",
|
||||
"timeout": 30,
|
||||
|
||||
@@ -22,7 +22,7 @@ class SettingCategory(str, Enum):
|
||||
REGISTRATION = "registration"
|
||||
EMAIL = "email"
|
||||
TEMPMAIL = "tempmail"
|
||||
CUSTOM_DOMAIN = "custom_domain"
|
||||
CUSTOM_DOMAIN = "moe_mail"
|
||||
SECURITY = "security"
|
||||
CPA = "cpa"
|
||||
|
||||
@@ -252,7 +252,7 @@ SETTING_DEFINITIONS: Dict[str, SettingDefinition] = {
|
||||
# 邮箱服务配置
|
||||
"email_service_priority": SettingDefinition(
|
||||
db_key="email.service_priority",
|
||||
default_value={"tempmail": 0, "outlook": 1, "custom_domain": 2},
|
||||
default_value={"tempmail": 0, "outlook": 1, "moe_mail": 2},
|
||||
category=SettingCategory.EMAIL,
|
||||
description="邮箱服务优先级"
|
||||
),
|
||||
@@ -665,7 +665,7 @@ class Settings(BaseModel):
|
||||
registration_sleep_max: int = 30
|
||||
|
||||
# 邮箱服务配置
|
||||
email_service_priority: Dict[str, int] = {"tempmail": 0, "outlook": 1, "custom_domain": 2}
|
||||
email_service_priority: Dict[str, int] = {"tempmail": 0, "outlook": 1, "moe_mail": 2}
|
||||
|
||||
# Tempmail.lol 配置
|
||||
tempmail_base_url: str = "https://api.tempmail.lol/v2"
|
||||
|
||||
Reference in New Issue
Block a user