test email now requires a domain

This commit is contained in:
Girish Ramakrishnan
2018-01-23 16:10:09 -08:00
parent 6edad6b986
commit e4b253da22
3 changed files with 9 additions and 4 deletions

View File

@@ -38,6 +38,8 @@
<fieldset>
<p class="has-error text-center" ng-show="testEmail.error">{{ testEmail.error.generic }}</p>
<p>This will send a test email from no-reply@{{domain}} to the below email address.</p>
<div class="form-group" ng-class="{ 'has-error': testEmail.error.key }">
<label class="control-label" for="inputTestEmailKey">Email to</label>
<input type="text" class="form-control" ng-model="testEmail.mailTo" id="inputTestMailTo" name="mailTo" ng-disabled="testEmail.busy" placeholder="Email address" autofocus>

View File

@@ -169,6 +169,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
mailTo: '',
domain: null,
clearForm: function () {
$scope.testEmail.mailTo = '';
},
@@ -177,6 +179,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
$scope.testEmail.error = {};
$scope.testEmail.busy = false;
$scope.testEmail.domain = $scope.selectedDomain;
$scope.testEmail.mailTo = $scope.user.email;
$('#testEmailModal').modal('show');
@@ -186,7 +189,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
$scope.testEmail.error = {};
$scope.testEmail.busy = true;
Client.sentTestMail($scope.testEmail.mailTo, function (error) {
Client.sendTestEmail($scope.selectedDomain.domain, $scope.testEmail.mailTo, function (error) {
$scope.testEmail.busy = false;
if (error) {