Send a test mail from the admin and log why delivery failed

Form submissions marked as not sent gave no reason: the transport
exception was swallowed. Every send now goes through MailCheck, which
logs the server's answer and a hint in German to var/log/mail.log
(server lines only, no credentials). The system screen shows the mail
route, sends a test mail to any address and lists recent attempts
(ADR 121).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5.5 committed 2026-10-12 20:29:36 +02:00
1 parent 090436233d
commit d313156c73
11 files changed
+501 -13

No files matched your search

+5
View File
@@ -2,3 +2,8 @@ framework:
mailer:
# Tests never send real mail; the transport collects messages in memory instead.
dsn: 'null://null'
parameters:
# Das Versandprotokoll der Tests gehört nicht nach var/log der echten Installation.
kant.mail_log: '%kernel.cache_dir%/mail.log'
kant.mailer_dsn: 'null://null'
+8
View File
@@ -10,6 +10,8 @@ parameters:
# das Projekt schreiben, und eine Installation mit schreibgeschuetztem public/ ebenfalls.
kant.fonts_dir: '%kernel.project_dir%/public/assets/fonts'
kant.asset_dir: '%kernel.project_dir%/public/assets'
kant.mail_log: '%kernel.project_dir%/var/log/mail.log'
kant.mailer_dsn: 'sendmail://default'
services:
_defaults:
@@ -59,6 +61,12 @@ services:
App\Content\StyleBundle:
arguments:
$assetDirectory: '%env(default:kant.asset_dir:ASSET_DIRECTORY)%'
# Versand und Protokoll (ADR 121). MAIL_LOG nur fuer Tests, damit sie nicht ins echte var/log
# schreiben.
App\Ops\MailCheck:
arguments:
$dsn: '%env(default:kant.mailer_dsn:MAILER_DSN)%'
$logFile: '%env(default:kant.mail_log:MAIL_LOG)%'
App\Controller\FormController:
arguments:
$secret: '%kernel.secret%'