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:
parent
dfad4f0ff4
commit
6a5435764e
2 changed files with 10 additions and 3 deletions
|
@ -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 />
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue