mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(server): Option to configure SMTPS transport (#22833)
* feat(server): Option to configure SMTPS transport This commit adds a boolean option in the SMTP transport configuration to enable the so-called "secure" mode. What it does is use SMTP over TLS instead of relying on the more common STARTTLS option over plain SMTP. * Add missing field in dto * Add missing field * Use a switch instead of text field * Add field in spec * chore: regen open-api --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
81554e5ad1
commit
95889a69c9
11 changed files with 33 additions and 1 deletions
|
|
@ -159,6 +159,7 @@ export interface SystemConfig {
|
|||
ignoreCert: boolean;
|
||||
host: string;
|
||||
port: number;
|
||||
secure: boolean;
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
|
|
@ -356,6 +357,7 @@ export const defaults = Object.freeze<SystemConfig>({
|
|||
ignoreCert: false,
|
||||
host: '',
|
||||
port: 587,
|
||||
secure: false,
|
||||
username: '',
|
||||
password: '',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -463,6 +463,9 @@ class SystemConfigSmtpTransportDto {
|
|||
@Max(65_535)
|
||||
port!: number;
|
||||
|
||||
@ValidateBoolean()
|
||||
secure!: boolean;
|
||||
|
||||
@IsString()
|
||||
username!: string;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export type SendEmailOptions = {
|
|||
export type SmtpOptions = {
|
||||
host: string;
|
||||
port?: number;
|
||||
secure?: boolean;
|
||||
username?: string;
|
||||
password?: string;
|
||||
ignoreCert?: boolean;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const smtpTransport = Object.freeze<SystemConfig>({
|
|||
ignoreCert: false,
|
||||
host: 'localhost',
|
||||
port: 587,
|
||||
secure: false,
|
||||
username: 'test',
|
||||
password: 'test',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ const configs = {
|
|||
ignoreCert: false,
|
||||
host: 'localhost',
|
||||
port: 587,
|
||||
secure: false,
|
||||
username: 'test',
|
||||
password: 'test',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
|
|||
transport: {
|
||||
host: '',
|
||||
port: 587,
|
||||
secure: false,
|
||||
username: '',
|
||||
password: '',
|
||||
ignoreCert: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue