diff --git a/src/views/email.js b/src/views/email.js index 891f04976..60b7aa284 100644 --- a/src/views/email.js +++ b/src/views/email.js @@ -250,9 +250,10 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio maybeSetupDns(function (error) { if (error) return console.error(error); - $scope.refreshDomain(); - - $scope.incomingEmail.busy = false; + $timeout(function () { + $scope.refreshDomain(); + $scope.incomingEmail.busy = false; + }, 5000); // wait for mail container to restart. it cannot get IP otherwise while refreshing }); }); }, @@ -266,8 +267,11 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio if (error) return console.error(error); $scope.reconfigureEmailApps(); - $scope.refreshDomain(); - $scope.incomingEmail.busy = false; + + $timeout(function () { + $scope.refreshDomain(); + $scope.incomingEmail.busy = false; + }, 5000); // wait for mail container to restart. it cannot get IP otherwise while refreshing }); } };