Add SMTP security mode selector with SSL/STARTTLS/none options and automatic port switching

Replaced boolean `smtp_use_tls` with explicit `smtp_security` enum field supporting "none", "starttls", and "ssl" modes. Added database migration to create `smtp_security` column with "starttls" default. Updated mailer to use SMTP_SSL client for direct SSL connections on port 465 and SMTP with STARTTLS for port 587. Modified admin settings UI to show dropdown selector with encryption options and auto-adjust
This commit is contained in:
2026-08-02 10:38:50 +02:00
parent 33caa8f792
commit e7d288ff12
5 changed files with 27 additions and 5 deletions
+1
View File
@@ -52,6 +52,7 @@ class AppSettings(Base):
smtp_from_email: Mapped[str] = mapped_column(String, default="")
smtp_from_name: Mapped[str] = mapped_column(String, default="Cluedo HP")
smtp_use_tls: Mapped[bool] = mapped_column(Boolean, default=True)
smtp_security: Mapped[str] = mapped_column(String, default="starttls")
app_base_url: Mapped[str] = mapped_column(String, default="http://localhost:8081")