diff --git a/app/templates/admin/settings.html b/app/templates/admin/settings.html index 7c9b33c9..6288a290 100644 --- a/app/templates/admin/settings.html +++ b/app/templates/admin/settings.html @@ -555,6 +555,13 @@ Sending... + +
+

+
+
+

+

Send a test email to verify the platform email configuration is working.

diff --git a/static/admin/js/settings.js b/static/admin/js/settings.js index e7190e49..f01cf059 100644 --- a/static/admin/js/settings.js +++ b/static/admin/js/settings.js @@ -78,6 +78,8 @@ function adminSettings() { emailEditMode: false, testEmailAddress: '', sendingTestEmail: false, + testEmailError: null, + testEmailSuccess: null, async init() { // Guard against multiple initialization @@ -464,13 +466,13 @@ function adminSettings() { async sendTestEmail() { if (!this.testEmailAddress) { - this.error = 'Please enter a test email address'; + this.testEmailError = 'Please enter a test email address'; return; } this.sendingTestEmail = true; - this.error = null; - this.successMessage = null; + this.testEmailError = null; + this.testEmailSuccess = null; try { const data = await apiClient.post('/admin/settings/email/test', { @@ -478,16 +480,16 @@ function adminSettings() { }); if (data.success) { - this.successMessage = `Test email sent to ${this.testEmailAddress}`; + this.testEmailSuccess = `Test email sent to ${this.testEmailAddress}`; setTimeout(() => { - this.successMessage = null; + this.testEmailSuccess = null; }, 5000); } else { - this.error = data.message || 'Failed to send test email'; + this.testEmailError = data.message || 'Failed to send test email'; } } catch (error) { settingsLog.error('Failed to send test email:', error); - this.error = error.message || 'Failed to send test email'; + this.testEmailError = error.message || 'Failed to send test email'; } finally { this.sendingTestEmail = false; }