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:
@@ -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 = ""
|
||||
|
||||
Reference in New Issue
Block a user