diff --git a/public/assets/js/ui-user.js b/public/assets/js/ui-user.js
index 4692f3f..498cb02 100755
--- a/public/assets/js/ui-user.js
+++ b/public/assets/js/ui-user.js
@@ -926,6 +926,7 @@ function renderSmtpProfileList() {
${escapeHtml(user)} |
${escapeHtml(sender)} |
+
@@ -943,6 +944,8 @@ function handleSmtpProfileTableClick(ev) {
if (!profile) return;
if (action === 'edit') {
openSmtpProfileForm(profile);
+ } else if (action === 'test') {
+ runSmtpProfileTest(profile.id);
} else if (action === 'copy') {
if (confirm(`Versandprofil "${profile.label || profile.smtp_host}" kopieren?`)) {
copySmtpProfile(id);
@@ -1031,6 +1034,18 @@ async function copySmtpProfile(profileId) {
}
}
+async function runSmtpProfileTest(profileId) {
+ const recipient = prompt('Test-E-Mail an welche Adresse senden?', window.__currentUser?.email || '');
+ if (!recipient) return;
+ try {
+ const res = await apiAction('account.smtp.test', { method: 'POST', data: { to: recipient.trim(), smtp_profile_id: profileId } });
+ if (!res?.ok) throw new Error(res?.error || 'SMTP Test fehlgeschlagen');
+ toast('SMTP Test gesendet', true);
+ } catch (err) {
+ toast(err.message || 'SMTP Test fehlgeschlagen', false);
+ }
+}
+
function escapeHtml(str) {
return String(str || '')
.replace(/&/g, '&')
|