Add option to delete mails

Part of cloudron/box#720
This commit is contained in:
Girish Ramakrishnan
2020-07-27 22:36:38 -07:00
parent c0dad4f5a0
commit 05de8b54ec
3 changed files with 21 additions and 4 deletions

View File

@@ -415,6 +415,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
remove: {
busy: false,
mailbox: null,
deleteMails: true,
show: function (mailbox) {
$scope.mailboxes.remove.mailbox = mailbox;
@@ -425,7 +426,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
submit: function () {
$scope.mailboxes.remove.busy = true;
Client.removeMailbox($scope.domain.domain, $scope.mailboxes.remove.mailbox.name, function (error) {
Client.removeMailbox($scope.domain.domain, $scope.mailboxes.remove.mailbox.name, $scope.mailboxes.remove.deleteMails, function (error) {
$scope.mailboxes.remove.busy = false;
if (error) return console.error(error);