Add email sending toggle and fix event timestamp default

Introduces enable_email_sending to control real email delivery in config. Updates Event.created_at to use default_factory for correct timestamp initialization.
This commit is contained in:
咕谷酱
2025-08-22 19:54:21 +08:00
parent 9b00dbda28
commit 93257f424c
2 changed files with 2 additions and 1 deletions

View File

@@ -119,6 +119,7 @@ class Settings(BaseSettings):
# 邮件服务设置
enable_email_verification: bool = Field(default=False, description="是否启用邮件验证功能")
enable_email_sending: bool = Field(default=False, description="是否真实发送邮件false时仅模拟发送输出到日志")
smtp_server: str = "localhost"
smtp_port: int = 587
smtp_username: str = ""