Add customizable email templates and remove alert recipients
All checks were successful
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 7s

Replaced the fixed `alert_recipients` list with customizable subject and body templates for alerts and warnings. This allows for more flexible and dynamic email notifications using placeholder variables. Updated relevant backend and frontend components to support this feature.
This commit is contained in:
2026-02-12 16:32:53 +01:00
parent e5a9acfa91
commit c437e72c2b
7 changed files with 204 additions and 35 deletions

View File

@@ -12,7 +12,10 @@ class EmailSettingsOut(BaseModel):
from_email: EmailStr | None
use_starttls: bool
use_ssl: bool
alert_recipients: list[EmailStr]
warning_subject_template: str | None
alert_subject_template: str | None
warning_body_template: str | None
alert_body_template: str | None
has_password: bool
updated_at: datetime | None
@@ -28,7 +31,10 @@ class EmailSettingsUpdate(BaseModel):
from_email: EmailStr | None = None
use_starttls: bool = True
use_ssl: bool = False
alert_recipients: list[EmailStr] = []
warning_subject_template: str | None = None
alert_subject_template: str | None = None
warning_body_template: str | None = None
alert_body_template: str | None = None
@field_validator("smtp_port")
@classmethod