CluPilotCloud/app
nexxo 7102d01bcc Keep the purpose mailer through the queue instead of losing it to the default
Mail::to($x)->queue($mail) resolves the DEFAULT mailer, and
Illuminate\Mail\Mailer::queue() (vendor Mailer.php:482) does
`$view->mailer($this->name)->queue($this->queue)` — overwriting
MaintenanceAnnouncementMail/MaintenanceCancelledMail's own 'cp_maintenance'
with the default mailer's name ('array' in tests, 'log'/whatever
MAIL_MAILER is in prod) before the job is even built. Both mails kept
sending through the old .env account instead of MailboxTransport. CloudReady
was never affected — MailChannel.php:66 preserves a notification's own
mailer.

Fix: name the mailer before queueing — Mail::mailer($mail->mailer)->to(...).
$this->name on the resolved Mailer is then already $mail->mailer, so the
vendor overwrite becomes a no-op instead of a silent downgrade. Confirmed by
reading the vendor source, not assumed.

SenderAddressTest's "names the purpose mailer..." test asserted
$mail->mailer on a bare, never-queued mailable, which proves nothing about
what survives queueing — the constructor sets it right regardless of what
MaintenanceNotifier does with it. Replaced it with one that drives
MaintenanceNotifier::deliver() under Queue::fake() and inspects the pushed
SendQueuedMailable's mailable. Verified it fails against the pre-fix code
first (the pushed job carried mailer = 'array'), then verified the fix
makes it pass, then mutated the fix away and watched it fail again.
2026-07-28 03:50:02 +02:00
..
Actions fix(billing): hold only what cannot be matched, and let migrations roll back 2026-07-26 13:57:11 +02:00
Console Make the private hostnames look like nothing is there, and close the way past the proxy 2026-07-27 11:26:48 +02:00
Http Let the console keep its recovery hostnames without breaking route caching 2026-07-27 06:20:44 +02:00
Livewire Prove a mailbox works by actually sending from it 2026-07-28 02:56:47 +02:00
Mail Pin CloudReady's null-mailbox guard and share it with the trait 2026-07-27 23:59:05 +02:00
Models Reuse the existing UUID trait instead of a second copy of the logic 2026-07-27 21:31:39 +02:00
Notifications Pin CloudReady's null-mailbox guard and share it with the trait 2026-07-27 23:59:05 +02:00
Policies fix(vpn): losing the operator roles closes the owner doors by itself 2026-07-25 22:50:13 +02:00
Providers Resolve the sending mailbox when the mail goes out, not at boot 2026-07-27 22:28:37 +02:00
Provisioning Measure availability, and let a customer move down again 2026-07-27 16:41:15 +02:00
Services Keep the purpose mailer through the queue instead of losing it to the default 2026-07-28 03:50:02 +02:00
Support Give the mailboxes a page, and the support sender its own capability 2026-07-28 01:57:11 +02:00