|
|
93375b612f
|
feat: 添加邮件功能第三阶段 - 密码重置
实现通过邮件自助重置密码功能:
- 新增发送密码重置邮件API (/api/forgot-password)
- 新增密码重置页面路由 (/reset-password/<token>)
- 新增确认密码重置API (/api/reset-password-confirm)
新增文件:
- templates/email/reset_password.html - 密码重置邮件模板
- templates/reset_password.html - 密码重置页面
修改文件:
- email_service.py - 添加密码重置相关函数
- send_password_reset_email()
- verify_password_reset_token()
- confirm_password_reset()
- app.py - 添加密码重置相关API
- templates/login.html - 忘记密码支持两种方式:
- 启用邮件功能:通过邮件自助重置
- 未启用邮件:提交申请等待管理员审核
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-11 21:58:49 +08:00 |
|
|
|
de8edcb3a6
|
feat: 添加邮件功能第二阶段 - 注册邮箱验证
实现注册时的邮箱验证功能:
- 修改注册API支持邮箱验证流程
- 新增邮箱验证API (/api/verify-email/<token>)
- 新增重发验证邮件API (/api/resend-verify-email)
- 新增邮箱验证状态查询API (/api/email/verify-status)
新增文件:
- templates/email/register.html - 注册验证邮件模板
- templates/verify_success.html - 验证成功页面
- templates/verify_failed.html - 验证失败页面
修改文件:
- email_service.py - 添加发送注册验证邮件函数
- app.py - 添加邮箱验证相关API
- database.py - 添加get_user_by_email函数
- app_config.py - 添加BASE_URL配置
- templates/register.html - 支持邮箱必填切换
- templates/login.html - 添加重发验证邮件功能
- templates/admin.html - 添加注册验证开关和BASE_URL设置
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-11 21:51:07 +08:00 |
|
|
|
966572cc94
|
feat: 添加邮件功能第一阶段 - 邮件基础设施
新增功能:
- 创建 email_service.py 邮件服务模块
- 支持多SMTP配置(主备切换、故障转移)
- 发送纯文本/HTML邮件
- 发送带附件邮件(支持ZIP压缩)
- 异步发送队列(多线程工作池)
- 每日发送限额控制
- 发送日志记录和统计
- 数据库表结构
- smtp_configs: 多SMTP配置表
- email_settings: 全局邮件设置
- email_tokens: 邮件验证Token
- email_logs: 邮件发送日志
- email_stats: 邮件发送统计
- API接口
- GET/POST /yuyx/api/email/settings: 全局邮件设置
- CRUD /yuyx/api/smtp/configs: SMTP配置管理
- POST /yuyx/api/smtp/configs/<id>/test: 测试SMTP连接
- POST /yuyx/api/smtp/configs/<id>/primary: 设为主配置
- GET /yuyx/api/email/stats: 邮件统计
- GET /yuyx/api/email/logs: 邮件日志
- POST /yuyx/api/email/logs/cleanup: 清理日志
- 后台管理页面
- 新增"邮件配置"Tab
- 全局邮件开关、故障转移开关
- SMTP配置列表管理
- 添加/编辑SMTP配置弹窗
- 邮件发送统计展示
- 邮件日志查询和清理
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-11 21:38:28 +08:00 |
|