mail: add banner ui

part of cloudron/box#341
This commit is contained in:
Girish Ramakrishnan
2020-08-24 10:16:11 -07:00
parent ae24c1d968
commit 566f0f7783
3 changed files with 84 additions and 11 deletions

View File

@@ -2215,6 +2215,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.setMailBanner = function (domain, data, callback) {
post('/api/v1/mail/' + domain + '/banner', data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.setCatchallAddresses = function (domain, addresses, callback) {
post('/api/v1/mail/' + domain + '/catch_all', { addresses: addresses }, null, function (error, data, status) {
if (error) return callback(error);