Implement mailfrom/masquerading setting
This commit is contained in:
@@ -79,7 +79,20 @@ async function onEnableIncoming() {
|
||||
|
||||
|
||||
const mailFromValidation = ref(false);
|
||||
const mailFromValidationBusy = ref(false);
|
||||
|
||||
async function onToggleMailFromValidation(value) {
|
||||
mailFromValidationBusy.value = true;
|
||||
|
||||
const [error] = await mailModel.setMailFromValidation(domain.value, value);
|
||||
if (error) {
|
||||
mailFromValidation.value = !value;
|
||||
mailFromValidationBusy.value = false;
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
mailFromValidationBusy.value = false;
|
||||
}
|
||||
|
||||
async function refreshMailConfig() {
|
||||
|
||||
@@ -148,7 +161,7 @@ onMounted(async () => {
|
||||
<label>{{ $t('email.masquerading.title') }}</label>
|
||||
<div v-html="$t('email.masquerading.description')"></div>
|
||||
</FormGroup>
|
||||
<Switch v-model="mailFromValidation" @change="onToggleMailFromValidation"/>
|
||||
<Switch v-model="mailFromValidation" @change="onToggleMailFromValidation" :disabled="mailFromValidationBusy"/>
|
||||
</SettingsItem>
|
||||
|
||||
<CatchAllSettingsItem :domain-config="mailConfig" />
|
||||
|
||||
Reference in New Issue
Block a user