Bundle a Mailpit catcher and default Compose to SMTP

Adds a mailpit service (axllent/mailpit, ~15 MB, in-memory) to
docker-compose.yml — chosen over the unmaintained MailHog for the same
footprint. It has no profile, so `docker compose up -d` starts it alongside
the API; the app defaults to MAIL_TRANSPORT=smtp -> mailpit:1025 (no
auth/TLS) and mail is read at http://localhost:8025.

Also change the default MAIL_FROM to no-reply@todo.test: PHPMailer v7 rejects
the dotless no-reply@localhost as an invalid address.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-04 08:40:36 +01:00
co-authored by Claude Sonnet 5
parent f9b65cc4a7
commit 64ba21795b
4 changed files with 29 additions and 15 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ final class Config
$mail = new MailConfig(
transport: strtolower(self::env('MAIL_TRANSPORT', 'mail')),
fromAddress: self::env('MAIL_FROM', 'no-reply@localhost'),
fromAddress: self::env('MAIL_FROM', 'no-reply@todo.test'),
fromName: self::env('MAIL_FROM_NAME', 'Todo List'),
logPath: $mailLogPath,
smtpHost: self::env('MAIL_SMTP_HOST'),