From 6a5435764e81c885b2bd2fa62632e086d4aa3f2e Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Sat, 15 Jun 2024 21:14:28 +0200 Subject: [PATCH] fix(web): allow sending test email when using config file (#10351) fix(web): send test email when using config file --- .../notification-settings.svelte | 12 +++++++++--- web/src/lib/i18n/en.json | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/web/src/lib/components/admin-page/settings/notification-settings/notification-settings.svelte b/web/src/lib/components/admin-page/settings/notification-settings/notification-settings.svelte index d4dec560a1..2be9d09860 100644 --- a/web/src/lib/components/admin-page/settings/notification-settings/notification-settings.svelte +++ b/web/src/lib/components/admin-page/settings/notification-settings/notification-settings.svelte @@ -55,7 +55,9 @@ message: $t('admin.notification_email_test_email_sent', { values: { email: $user.email } }), }); - dispatch('save', { notifications: config.notifications }); + if (!disabled) { + dispatch('save', { notifications: config.notifications }); + } } catch (error) { handleError(error, $t('admin.notification_email_test_email_failed')); } finally { @@ -138,8 +140,12 @@ />
- {#if isSending} diff --git a/web/src/lib/i18n/en.json b/web/src/lib/i18n/en.json index d4cb319a36..45950869c4 100644 --- a/web/src/lib/i18n/en.json +++ b/web/src/lib/i18n/en.json @@ -140,6 +140,7 @@ "notification_email_port_description": "Port of the email server (e.g 25, 465, or 587)", "notification_email_sent_test_email_button": "Send test email and save", "notification_email_setting_description": "Settings for sending email notifications", + "notification_email_test_email": "Send test email", "notification_email_test_email_failed": "Failed to send test email, check your values", "notification_email_test_email_sent": "A test email has been sent to {email}. Please check your inbox.", "notification_email_username_description": "Username to use when authenticating with the email server",