diff --git a/components/admin/SMTP.vue b/components/admin/SMTP.vue index 9f00774b..ac330d52 100644 --- a/components/admin/SMTP.vue +++ b/components/admin/SMTP.vue @@ -52,6 +52,7 @@ export default { async testSMTP () { this.loading = true try { + this.setSetting({ key: 'smtp', value: this.smtp }) await this.$axios.$post('/settings/smtp', { smtp: this.smtp }) this.$root.$message(this.$t('admin.smtp_test_success', { admin_email: this.admin_email }), { color: 'success' }) } catch (e) { @@ -66,8 +67,8 @@ export default { } }, done () { + this.setSetting({ key: 'smtp', value: JSON.parse(JSON.stringify(this.smtp)) }) this.$emit('close') - this.setSetting({ key: 'smtp', value: this.smtp }) }, }