-
The import requires a specific schema for JSON. The detailed schema is described in our documentation
+
The import requires a specific schema for JSON. The detailed schema is described in our documentation
diff --git a/src/views/email.js b/src/views/email.js
index 78e151f9d..81d09dcfe 100644
--- a/src/views/email.js
+++ b/src/views/email.js
@@ -449,7 +449,18 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
return console.error('Failed to list mailboxes.', error);
}
- var file = new Blob([ JSON.stringify(result, null, 2) ], { type: 'application/json' });
+ var content = JSON.stringify(result.map(function (mailbox) {
+ return {
+ name: mailbox.name,
+ domain: mailbox.domain,
+ ownerId: mailbox.ownerId,
+ ownerType: mailbox.ownerType,
+ active: mailbox.ative,
+ aliases: mailbox.aliases
+ };
+ }), null, 2);
+
+ var file = new Blob([ content ], { type: 'application/json' });
var a = document.createElement('a');
a.href = URL.createObjectURL(file);
a.download = $scope.domain.domain.replaceAll('.','_') + '-mailboxes.json';