CluPilotCloud/config
nexxo 095d8e694a Resolve the sending mailbox when the mail goes out, not at boot
Five purpose-named mailers (cp_maintenance, cp_provisioning, cp_support,
cp_billing, cp_system) land in config/mail.php as plain static entries —
no query runs to build them. Mail::extend('mailbox', ...) in
AppServiceProvider registers a transport that looks up its mailbox
through MailboxResolver only once a mailer is actually resolved, which
for queued mail is inside the worker at send time, never at boot.

Mutation-tested the brief's own three tests by deleting the MAIL_MAILER
guard from MailboxTransport::delegate(): all three stayed green. They
only exercise __toString()/describe(), a code path separate from the one
that actually sends. Added two tests that reach into delegate() itself
(a bound closure, since it's private) and assert the transport it
actually builds: LogTransport while MAIL_MAILER=log, EsmtpTransport once
it isn't. Re-ran the same mutation against the strengthened suite: it
now fails (EsmtpTransport where LogTransport was expected), then passes
again once reverted.

Verified two things against the installed versions before writing this:
LogTransport takes a Psr\Log\LoggerInterface and Log::channel(null)
resolves to the default channel rather than throwing, and
Mail::extend('mailbox', ...) is read by
MailManager::createSymfonyTransport() via $config['transport'] before it
would fall back to createSmtpTransport() — both matched the brief
exactly, no changes needed there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 22:28:37 +02:00
..
admin_access.php Serve the console inside the tunnel, without publishing the internal network 2026-07-27 10:14:33 +02:00
app.php Show times on the operator's clock, keep storing them in UTC 2026-07-27 17:32:21 +02:00
auth.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
broadcasting.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
cache.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
countries.php fix(admin): no admin lockout (is_admin fallback); centered modal width; datacenter edit modal + country dropdown 2026-07-25 18:09:17 +02:00
database.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
filesystems.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
fortify.php Let people change their own password, and a location be switched off while editing it 2026-07-27 07:49:07 +02:00
logging.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
mail.php Resolve the sending mailbox when the mail goes out, not at boot 2026-07-27 22:28:37 +02:00
permission.php feat(admin): staff RBAC (spatie) + admin settings page 2026-07-25 15:47:42 +02:00
provisioning.php Serve the console inside the tunnel, without publishing the internal network 2026-07-27 10:14:33 +02:00
queue.php fix(engine): durable queueing for long provisioning steps 2026-07-25 10:36:49 +02:00
services.php feat(billing): Stripe owns the billing cycle, we own capability 2026-07-26 13:36:28 +02:00
session.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00