Send the complete application (body + generated attachments) to a user-entered address via authenticated SMTP submission through the account's own server, so it applies DKIM and uses its reputable IP/PTR — required for deliverability here (domain publishes SPF -all, DMARC p=reject). From/Return-Path stay aligned on the sending domain. Reply e-mails are polled over IMAP, parsed, stored and matched to the right application (via In-Reply-To/References, then sender address); their attachments are saved and downloadable. The detail page gains a correspondence thread with compose, threaded reply, and an AI-drafted reply the user can edit before sending. New: lib/mailer.js (nodemailer + imapflow + mailparser), generateEmailReply in lib/documents.js, emails/email_anhaenge/app_state tables, background poller + manual fetch. Credentials come from MAIL_* env vars (.env, not committed / not in the image). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
933 B
Bash
27 lines
933 B
Bash
# Kopiere diese Datei nach .env und trage deinen Schlüssel ein.
|
||
# .env wird NICHT eingecheckt (siehe .gitignore).
|
||
|
||
# Ollama Cloud API-Schlüssel – https://ollama.com/settings/keys
|
||
OLLAMA_API_KEY=
|
||
|
||
# Optional – Cloud-Modell (Standard: gpt-oss:120b)
|
||
# OLLAMA_MODEL=gpt-oss:120b
|
||
|
||
# Optional – anderer Host (z. B. lokale Ollama-Instanz: http://localhost:11434)
|
||
# OLLAMA_HOST=https://ollama.com
|
||
|
||
# --- E-Mail (SMTP-Versand + IMAP-Empfang) ---
|
||
# Versand läuft über die authentifizierte Submission des eigenen Mailservers,
|
||
# damit dieser DKIM signiert und die reputable IP/PTR nutzt (SPF/DMARC-Alignment).
|
||
# Ohne diese Angaben ist der E-Mail-Teil deaktiviert.
|
||
MAIL_HOST=mail.example.com
|
||
MAIL_SMTP_PORT=587
|
||
MAIL_IMAP_PORT=993
|
||
MAIL_USER=name@example.com
|
||
MAIL_PASSWORD=
|
||
MAIL_FROM_NAME=Vorname Nachname
|
||
MAIL_FROM=name@example.com
|
||
# IMAP-Postfach + Abrufintervall (ms) für neue Antwortmails
|
||
MAIL_IMAP_MAILBOX=INBOX
|
||
MAIL_POLL_MS=180000
|