This commit is contained in:
stardrophere
2026-04-02 01:25:30 +08:00
parent 7c01b5c265
commit f4d9b2075c
9 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ def _normalize_email(email: str) -> str:
def _build_verification_email(code: str, purpose_text: str, expire_minutes: int) -> str:
return f"""
<div style="font-family: Arial, sans-serif; line-height: 1.6; color: #222;">
<h2 style="margin-bottom: 12px;">InsightRadar 邮箱验证</h2>
<h2 style="margin-bottom: 12px;">聚势智见邮箱验证</h2>
<p>您的{purpose_text}验证码是:</p>
<p style="font-size: 28px; font-weight: bold; letter-spacing: 4px; color: #0b57d0;">{code}</p>
<p>该验证码在 {expire_minutes} 分钟内有效。请勿泄露给他人。</p>
@@ -203,7 +203,7 @@ async def send_register_code(
await send_html_email(
to_email=email,
subject=f"{code}InsightRadar 注册验证码",
subject=f"{code}聚势智见 注册验证码",
html_content=_build_verification_email(
code, "注册", REGISTER_CODE_EXPIRE_MINUTES
),
@@ -241,7 +241,7 @@ async def send_login_code(
await send_html_email(
to_email=email,
subject=f"{code}InsightRadar 登录验证码",
subject=f"{code}聚势智见 登录验证码",
html_content=_build_verification_email(
code, "登录", LOGIN_CODE_EXPIRE_MINUTES
),