+37
-11
@@ -238,6 +238,29 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
};
|
||||
|
||||
$scope.banner = {
|
||||
busy: false,
|
||||
text: '',
|
||||
html: '',
|
||||
|
||||
submit: function () {
|
||||
$scope.banner.busy = true;
|
||||
|
||||
Client.setMailBanner($scope.domain.domain, { text: $scope.banner.text, html: $scope.banner.html }, function (error) {
|
||||
if (error) {
|
||||
$scope.banner.busy = false;
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
// give sometime for the mail container to restart
|
||||
$timeout(function () {
|
||||
$scope.banner.busy = false;
|
||||
$scope.refreshDomain();
|
||||
}, 5000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.incomingEmail = {
|
||||
busy: false,
|
||||
setupDns: true,
|
||||
@@ -525,6 +548,17 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
busy: false,
|
||||
preset: $scope.mailRelayPresets[0],
|
||||
|
||||
// form data to be set on load
|
||||
relay: {
|
||||
provider: 'cloudron-smtp',
|
||||
host: '',
|
||||
port: 25,
|
||||
username: '',
|
||||
password: '',
|
||||
serverApiToken: '',
|
||||
acceptSelfSignedCerts: false
|
||||
},
|
||||
|
||||
presetChanged: function () {
|
||||
$scope.mailRelay.error = null;
|
||||
|
||||
@@ -537,17 +571,6 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
$scope.mailRelay.relay.acceptSelfSignedCerts = false;
|
||||
},
|
||||
|
||||
// form data to be set on load
|
||||
relay: {
|
||||
provider: 'cloudron-smtp',
|
||||
host: '',
|
||||
port: 25,
|
||||
username: '',
|
||||
password: '',
|
||||
serverApiToken: '',
|
||||
acceptSelfSignedCerts: false
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.mailRelay.error = null;
|
||||
$scope.mailRelay.busy = true;
|
||||
@@ -685,6 +708,9 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
}
|
||||
|
||||
$scope.banner.text = mailConfig.banner.text || '';
|
||||
$scope.banner.html = mailConfig.banner.html || '';
|
||||
|
||||
// amend to selected domain to be available for the UI
|
||||
$scope.domain.mailConfig = mailConfig;
|
||||
$scope.domain.mailStatus = {};
|
||||
|
||||
Reference in New Issue
Block a user