refactor(email): 重构邮件通知逻辑并改进邮件模板

- 移除对 EMAIL_ADDRESS 环境变量的依赖,统一从数据库获取管理员邮箱
- 重构邮件通知逻辑,增加管理员回复的验证
- 改进邮件模板的样式和内容
- 将 getAdminNotifyEmail 函数导出以供其他模块使用
This commit is contained in:
anghunk
2026-01-19 20:55:19 +08:00
parent 054d75d027
commit a722788cc9
4 changed files with 124 additions and 72 deletions

View File

@@ -5,8 +5,7 @@ export type Bindings = {
CF_FROM_EMAIL?: string
SEND_EMAIL?: {
send: (message: any) => Promise<any>
}
EMAIL_ADDRESS?: string
}
ADMIN_NAME: string
ADMIN_PASSWORD: string
}