Mailversand: Antwortadresse, Absendername WEBklar, nur mit STARTTLS

- SMTP_REPLY_TO (z. B. support@webklar.com) setzt Reply-To auf allen
  Kundenmails, damit Antworten nicht im Versandpostfach (noreply@) landen
- Absendername einheitlich "WEBklar" (Kunden) bzw. "WEBklar Kundenbereich"
  (interne Hinweise) statt "Webklar"/"Webklar Kundenportal"
- requireTLS auf Port 587: der neue Mailserver (Hetzner) nimmt die
  Anmeldung auch unverschluesselt an; ohne STARTTLS wird jetzt nicht gesendet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-27 12:12:37 +00:00
1 parent 32e441c8bc
commit 60baeb3271
2 files changed
+8 -3

No files matched your search

+6 -3
View File
@@ -10,6 +10,8 @@ function getTransporter() {
host: config.smtp.host,
port: config.smtp.port,
secure: config.smtp.secure,
// Port 587: ohne STARTTLS nicht senden (Hetzner erlaubt die Anmeldung auch unverschluesselt)
requireTLS: !config.smtp.secure,
auth: { user: config.smtp.user, pass: config.smtp.pass },
})
}
@@ -37,7 +39,7 @@ export async function sendChatNotification(customer, text) {
const name = customer.name || customer.email || 'Kunde'
await mailer.sendMail({
from: `"Webklar Kundenportal" <${config.smtp.from}>`,
from: `"WEBklar Kundenbereich" <${config.smtp.from}>`,
to: config.chatNotify.emails.join(', '),
subject: `Neue Portalnachricht von ${name}`,
text: [
@@ -65,7 +67,7 @@ export async function sendAdminNotice(subject, lines) {
const mailer = getTransporter()
if (!mailer || !config.chatNotify.emails.length) return { sent: false, reason: 'nicht konfiguriert' }
await mailer.sendMail({
from: `"Webklar Kundenportal" <${config.smtp.from}>`,
from: `"WEBklar Kundenbereich" <${config.smtp.from}>`,
to: config.chatNotify.emails.join(', '),
subject: `[Abo] ${subject}`,
text: lines.join('\n'),
@@ -86,7 +88,8 @@ export async function sendCustomerMail(to, subject, lines, attachments = []) {
const mailer = getTransporter()
if (!mailer) throw new Error('SMTP nicht konfiguriert')
return mailer.sendMail({
from: `"Webklar" <${config.smtp.from}>`,
from: `"WEBklar" <${config.smtp.from}>`,
replyTo: config.smtp.replyTo || undefined,
to,
bcc: config.chatNotify.emails.join(', ') || undefined,
subject,