Add noop relay backend

Part of cloudron/box#622
This commit is contained in:
Girish Ramakrishnan
2019-03-15 11:16:43 -07:00
parent 05c858df9e
commit 0345c52aba
2 changed files with 13 additions and 9 deletions

View File

@@ -409,8 +409,10 @@
</div>
</uib-tab>
<uib-tab index="1" heading="Outbound Relay">
<uib-tab index="1" heading="Outbound">
<div class="card card-large" style="margin-bottom: 15px;">
<h4>Email Relay</h4>
<div class="row">
<div class="col-md-12">
Select the mail server (Smart host) through which Cloudron will send outbound mails:
@@ -424,10 +426,15 @@
<div class="form-group">
<select class="form-control" style="width: 50%;" ng-model="mailRelay.preset" ng-options="a.name for a in mailRelayPresets track by a.provider" ng-change="mailRelay.presetChanged()"></select>
</div>
<p class="small text-danger" ng-show="mailRelay.preset.provider === 'noop' && selectedDomain.domain === config.adminDomain">
Cloudron cannot send user invites, password reset and other notifications when email is disabled on the primary domain
</p>
</div>
</div>
<div class="row" ng-show="mailRelay.preset.provider !== 'cloudron-smtp'">
<div class="row" ng-show="mailRelay.preset.provider !== 'cloudron-smtp' && mailRelay.preset.provider !== 'noop'">
<div class="col-md-6">
<div>
<form name="mailRelayForm" role="form" ng-submit="mailRelay.submit()" autocomplete="off" novalidate>
@@ -480,7 +487,7 @@
<div class="row">
<div class="col-md-12">
<button class="btn btn-primary" ng-click="mailRelay.submit()" ng-disabled="(mailRelay.preset.provider !== 'cloudron-smtp' && (!mailRelayForm.$dirty || mailRelayForm.$invalid)) || mailRelay.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailRelay.busy"></i> Save</button>
<button class="btn btn-primary" ng-click="mailRelay.submit()" ng-disabled="(mailRelay.preset.provider !== 'cloudron-smtp' && mailRelay.preset.provider !== 'noop' && (!mailRelayForm.$dirty || mailRelayForm.$invalid)) || mailRelay.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailRelay.busy"></i> Save</button>
<span class="has-error text-center" ng-show="mailRelay.error">{{ mailRelay.error }}</span>
<span class="text-success text-center text-bold" ng-show="mailRelay.success">Saved</span>
@@ -504,7 +511,7 @@
</div>
</uib-tab>
<uib-tab index="3" heading="Status" ng-if="selectedDomain.provider !== 'caas'">
<uib-tab index="3" heading="Status">
<div class="card card-large" style="margin-bottom: 15px;" ng-show="selectedDomain.mailConfig.relay.provider === 'cloudron-smtp'">
<div class="row">
<div class="col-md-12">
@@ -539,9 +546,7 @@
</div>
</div>
<br/>
<div class="card card-large" style="margin-bottom: 15px;">
<div class="card card-large" style="margin-bottom: 15px;" ng-if="selectedDomain.mailConfig.relay.provider !== 'noop'">
<div class="row">
<div class="col-md-12">
<h4>SMTP Status <sup><a href="https://cloudron.io/documentation/troubleshooting/#mail-smtp" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></h4>
@@ -592,8 +597,6 @@
</div>
</div>
<br/>
<div class="card card-large" style="margin-bottom: 15px;">
<div class="row">
<div class="col-md-12">