CluPilotCloud/tests/Feature/Mail
nexxo e8a3b8d5be Seed the mailbox address from mail.from.address, not the SMTP login
The takeover migration seeded `address` from MAIL_USERNAME and left
`username` null unconditionally, conflating the SMTP login with the
sender address. Whenever the two differ — an API-key username, a
shared relay login — mail would go out From the login instead of the
address the system was actually configured to send from, exactly like
this installation: MAIL_USERNAME is no-reply@clupilot.com but
MAIL_FROM_ADDRESS is hello@clupilot.local.

`address` now reads config('mail.from.address'), falling back to the
SMTP login only when that reads back config/mail.php's own unset
placeholder (env('MAIL_FROM_ADDRESS', 'hello@example.com') — the same
masking problem UNCONFIGURED_HOST already guards against for
MAIL_HOST). `username` is set to the SMTP login only when it actually
differs from the resolved address, since Mailbox::smtpUsername()
already falls back to address when username is null. display_name
now reads config('mail.from.name') instead of a hardcoded literal.

The placeholder domain for the four non-configured mailboxes still
comes from the SMTP login, not from mail.from.address — the two can
name different domains, and only the login's is proven to accept mail
for a given install.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 04:49:37 +02:00
..
MailSettingsPageTest.php Validate purpose mappings against real mailboxes, and clear stale verification on identity changes 2026-07-28 04:35:16 +02:00
MailboxModelTest.php Move the one SMTP account into the mailbox table it outgrew 2026-07-28 00:24:54 +02:00
MailboxResolverTest.php Move the one SMTP account into the mailbox table it outgrew 2026-07-28 00:24:54 +02:00
MailboxSeedMigrationTest.php Seed the mailbox address from mail.from.address, not the SMTP login 2026-07-28 04:49:37 +02:00
MailboxTakeoverTest.php Close the data-loss paths the review found in the mailbox takeover 2026-07-28 01:15:50 +02:00
MailboxTesterTest.php Make ssl, tls, and none mean what they say on the wire 2026-07-28 04:35:03 +02:00
MailboxTransportTest.php Make ssl, tls, and none mean what they say on the wire 2026-07-28 04:35:03 +02:00
SenderAddressTest.php Keep the purpose mailer through the queue instead of losing it to the default 2026-07-28 03:50:02 +02:00