diff --git a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html index b205a1f3df..9ed77a4eda 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html @@ -76,10 +76,10 @@ {{ 'admin.timeout-invalid' | translate }} - + {{ 'admin.enable-tls' | translate }} - + admin.tls-version diff --git a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts index 8db1d3cc94..0cdf0e7a7c 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts @@ -25,6 +25,7 @@ import { AdminService } from '@core/http/admin.service'; import { ActionNotificationShow } from '@core/notification/notification.actions'; import { TranslateService } from '@ngx-translate/core'; import { HasConfirmForm } from '@core/guards/confirm-on-exit.guard'; +import { isString } from '@core/utils'; @Component({ selector: 'tb-mail-server', @@ -52,6 +53,9 @@ export class MailServerComponent extends PageComponent implements OnInit, HasCon this.adminService.getAdminSettings('mail').subscribe( (adminSettings) => { this.adminSettings = adminSettings; + if (this.adminSettings.jsonValue && isString(this.adminSettings.jsonValue.enableTls)) { + this.adminSettings.jsonValue.enableTls = (this.adminSettings.jsonValue.enableTls as any) === 'true'; + } this.mailSettings.reset(this.adminSettings.jsonValue); this.enableProxyChanged(); } @@ -69,7 +73,7 @@ export class MailServerComponent extends PageComponent implements OnInit, HasCon timeout: ['10000', [Validators.required, Validators.pattern(/^[0-9]{1,6}$/), Validators.maxLength(6)]], - enableTls: ['false'], + enableTls: [false], tlsVersion: [], enableProxy: [false, []], proxyHost: ['', [Validators.required]],