1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(web): allow sending test email when using config file (#10351)

fix(web): send test email when using config file
This commit is contained in:
Michel Heusschen 2024-06-15 21:14:28 +02:00 committed by GitHub
parent dfad4f0ff4
commit 6a5435764e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -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 @@
/>
<div class="flex gap-2 place-items-center">
<Button size="sm" disabled={disabled || !config.notifications.smtp.enabled} on:click={handleSendTestEmail}
>{$t('admin.notification_email_sent_test_email_button')}
<Button size="sm" disabled={!config.notifications.smtp.enabled} on:click={handleSendTestEmail}>
{#if disabled}
{$t('admin.notification_email_test_email')}
{:else}
{$t('admin.notification_email_sent_test_email_button')}
{/if}
</Button>
{#if isSending}
<LoadingSpinner />

View file

@ -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",