Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@
"notification_email_ignore_certificate_errors_description": "Ignore TLS certificate validation errors (not recommended)",
"notification_email_password_description": "Password to use when authenticating with the email server",
"notification_email_port_description": "Port of the email server (e.g 25, 465, or 587)",
"notification_email_secure": "SMTPS",
"notification_email_secure_description": "Use SMTPS (SMTP over TLS)",
"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",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions open-api/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -16726,6 +16726,9 @@
"minimum": 0,
"type": "number"
},
"secure": {
"type": "boolean"
},
"username": {
"type": "string"
}
Expand All @@ -16735,6 +16738,7 @@
"ignoreCert",
"password",
"port",
"secure",
"username"
],
"type": "object"
Expand Down
1 change: 1 addition & 0 deletions open-api/typescript-sdk/src/fetch-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export type SystemConfigSmtpTransportDto = {
ignoreCert: boolean;
password: string;
port: number;
secure: boolean;
username: string;
};
export type SystemConfigSmtpDto = {
Expand Down
2 changes: 2 additions & 0 deletions server/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export interface SystemConfig {
ignoreCert: boolean;
host: string;
port: number;
secure: boolean;
username: string;
password: string;
};
Expand Down Expand Up @@ -356,6 +357,7 @@ export const defaults = Object.freeze<SystemConfig>({
ignoreCert: false,
host: '',
port: 587,
secure: false,
username: '',
password: '',
},
Expand Down
3 changes: 3 additions & 0 deletions server/src/dtos/system-config.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ class SystemConfigSmtpTransportDto {
@Max(65_535)
port!: number;

@ValidateBoolean()
secure!: boolean;

@IsString()
username!: string;

Expand Down
1 change: 1 addition & 0 deletions server/src/repositories/email.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type SendEmailOptions = {
export type SmtpOptions = {
host: string;
port?: number;
secure?: boolean;
username?: string;
password?: string;
ignoreCert?: boolean;
Expand Down
1 change: 1 addition & 0 deletions server/src/services/notification-admin.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const smtpTransport = Object.freeze<SystemConfig>({
ignoreCert: false,
host: 'localhost',
port: 587,
secure: false,
username: 'test',
password: 'test',
},
Expand Down
1 change: 1 addition & 0 deletions server/src/services/notification.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const configs = {
ignoreCert: false,
host: 'localhost',
port: 587,
secure: false,
username: 'test',
password: 'test',
},
Expand Down
1 change: 1 addition & 0 deletions server/src/services/system-config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
transport: {
host: '',
port: 587,
secure: false,
username: '',
password: '',
ignoreCert: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
transport: {
host: config.notifications.smtp.transport.host,
port: config.notifications.smtp.transport.port,
secure: config.notifications.smtp.transport.secure,
username: config.notifications.smtp.transport.username,
password: config.notifications.smtp.transport.password,
ignoreCert: config.notifications.smtp.transport.ignoreCert,
Expand Down Expand Up @@ -128,6 +129,13 @@
savedConfig.notifications.smtp.transport.password}
/>

<SettingSwitch
title={$t('admin.notification_email_secure')}
subtitle={$t('admin.notification_email_secure_description')}
disabled={disabled || !config.notifications.smtp.enabled}
bind:checked={config.notifications.smtp.transport.secure}
/>

<SettingSwitch
title={$t('admin.notification_email_ignore_certificate_errors')}
subtitle={$t('admin.notification_email_ignore_certificate_errors_description')}
Expand Down
Loading