create recvmail mailbox automatically
This commit is contained in:
@@ -150,6 +150,14 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
|
||||
if ($scope.appConfigure.mailboxNameEnabled) {
|
||||
data.mailboxName = $scope.appConfigure.mailboxName;
|
||||
|
||||
// add mailbox automatically for convenience
|
||||
if ($scope.appConfigure.app.manifest.addons.recvmail) {
|
||||
Client.addMailbox(data.domain, data.mailboxName, $scope.user.id, function (error) {
|
||||
if (error && error.statusCode !== 409) console.error(error); // it's fine if it already exists
|
||||
});
|
||||
}
|
||||
|
||||
} else { // setting to empty will reset to .app name
|
||||
data.mailboxName = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user