Make customer upload-confirmation email opt-out via settings
New smtp_notify_customer toggle in the SMTP section. Defaults to true to preserve existing behavior. When unchecked, customers no longer receive the upload summary even if they have an email on file; staff and (optionally) admins keep getting their notifications. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -379,6 +379,12 @@
|
||||
<div><label>Absender (From)</label><input name="smtp_from" placeholder="noreply@firma.de" /></div>
|
||||
</div>
|
||||
<div class="field" style="margin-top:.75rem">
|
||||
<label style="display:flex; align-items:center; gap:.4rem">
|
||||
<input type="checkbox" name="smtp_notify_customer" style="width:auto" />
|
||||
Kunden nach Upload eine Bestätigungsmail schicken (nur wenn E-Mail beim Kunden hinterlegt)
|
||||
</label>
|
||||
</div>
|
||||
<div class="field" style="margin-top:.5rem">
|
||||
<label style="display:flex; align-items:center; gap:.4rem">
|
||||
<input type="checkbox" name="smtp_notify_admin" style="width:auto" />
|
||||
Admins bei jedem Upload benachrichtigen (alle Admins mit E-Mail-Adresse)
|
||||
@@ -765,6 +771,7 @@ async function loadSettings() {
|
||||
? 'gesetzt — leer = unverändert lassen'
|
||||
: 'nicht gesetzt';
|
||||
sf.smtp_notify_admin.checked = !!s.smtp_notify_admin;
|
||||
sf.smtp_notify_customer.checked = s.smtp_notify_customer !== false;
|
||||
}
|
||||
function setSlider(id, val) {
|
||||
document.getElementById(id).value = val;
|
||||
@@ -819,6 +826,7 @@ document.getElementById('smtpForm').addEventListener('submit', async (e) => {
|
||||
smtp_user: fd.get('smtp_user') || '',
|
||||
smtp_from: fd.get('smtp_from') || '',
|
||||
smtp_notify_admin: !!fd.get('smtp_notify_admin'),
|
||||
smtp_notify_customer: !!fd.get('smtp_notify_customer'),
|
||||
};
|
||||
const pw = fd.get('smtp_pass');
|
||||
if (pw) body.smtp_pass = pw;
|
||||
|
||||
Reference in New Issue
Block a user