From 5c04074d54f4db8c71b12c62c9f55d2144477819 Mon Sep 17 00:00:00 2001 From: Maurice Date: Wed, 1 Apr 2026 12:20:03 +0200 Subject: [PATCH] fix: allow unauthenticated SMTP by saving empty user/pass fields (#265) The test-smtp button filtered out empty SMTP user/password values before saving, preventing unauthenticated SMTP setups from working. Changed filter from truthy check to !== undefined so empty strings are properly persisted. --- client/src/pages/AdminPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/AdminPage.tsx b/client/src/pages/AdminPage.tsx index c57aad65..d195d030 100644 --- a/client/src/pages/AdminPage.tsx +++ b/client/src/pages/AdminPage.tsx @@ -1122,7 +1122,7 @@ export default function AdminPage(): React.ReactElement { onClick={async () => { const smtpKeys = ['smtp_host', 'smtp_port', 'smtp_user', 'smtp_pass', 'smtp_from', 'smtp_skip_tls_verify'] const payload: Record = {} - for (const k of smtpKeys) { if (smtpValues[k]) payload[k] = smtpValues[k] } + for (const k of smtpKeys) { if (smtpValues[k] !== undefined) payload[k] = smtpValues[k] } await authApi.updateAppSettings(payload).catch(() => {}) try { const result = await notificationsApi.testSmtp()