...
|
...
|
@@ -25,6 +25,7 @@ import { AdminService } from '@core/http/admin.service'; |
25
|
25
|
import { ActionNotificationShow } from '@core/notification/notification.actions';
|
26
|
26
|
import { TranslateService } from '@ngx-translate/core';
|
27
|
27
|
import { HasConfirmForm } from '@core/guards/confirm-on-exit.guard';
|
|
28
|
+import { isString } from '@core/utils';
|
28
|
29
|
|
29
|
30
|
@Component({
|
30
|
31
|
selector: 'tb-mail-server',
|
...
|
...
|
@@ -52,6 +53,9 @@ export class MailServerComponent extends PageComponent implements OnInit, HasCon |
52
|
53
|
this.adminService.getAdminSettings<MailServerSettings>('mail').subscribe(
|
53
|
54
|
(adminSettings) => {
|
54
|
55
|
this.adminSettings = adminSettings;
|
|
56
|
+ if (this.adminSettings.jsonValue && isString(this.adminSettings.jsonValue.enableTls)) {
|
|
57
|
+ this.adminSettings.jsonValue.enableTls = (this.adminSettings.jsonValue.enableTls as any) === 'true';
|
|
58
|
+ }
|
55
|
59
|
this.mailSettings.reset(this.adminSettings.jsonValue);
|
56
|
60
|
this.enableProxyChanged();
|
57
|
61
|
}
|
...
|
...
|
@@ -69,7 +73,7 @@ export class MailServerComponent extends PageComponent implements OnInit, HasCon |
69
|
73
|
timeout: ['10000', [Validators.required,
|
70
|
74
|
Validators.pattern(/^[0-9]{1,6}$/),
|
71
|
75
|
Validators.maxLength(6)]],
|
72
|
|
- enableTls: ['false'],
|
|
76
|
+ enableTls: [false],
|
73
|
77
|
tlsVersion: [],
|
74
|
78
|
enableProxy: [false, []],
|
75
|
79
|
proxyHost: ['', [Validators.required]],
|
...
|
...
|
|