Files
pulse/internal/notifications
rcourtman 0464bdbad0 Stop test-config sends from leaking stale auth into shared SMTP manager
When the email config passed to sendHTMLEmailWithError differs from the
manager's persisted config (a test send with edited but unsaved
settings), build a fresh manager so stale Username, Password,
AuthRequired, SMTPHost, SMTPPort, TLS, StartTLS, or Provider fields
cannot leak into the SMTP exchange. The shared production manager is
left untouched.

Without this, a relay-mode test (port 25, no credentials) on a
deployment that previously had authenticated SMTP saved would still
attempt AUTH and fail with "AUTH not available" because the manager's
old AuthRequired and credentials persisted (Fixes #1440).

When the configs match, the existing reuse path is preserved so the
production manager's rate limiter keeps working across grouped sends.
2026-04-30 10:28:47 +01:00
..