fix(email): use client/org name as From display, not Ladill product
Deploy Ladill Events / deploy (push) Successful in 45s

Customer-facing outbound mail should appear from the business (organizer,
clinic, company, location), not the Ladill product brand.
This commit is contained in:
isaacclad
2026-07-16 12:01:06 +00:00
parent a5ebd1e414
commit a7231ab16f
4 changed files with 40 additions and 6 deletions
+11 -1
View File
@@ -78,7 +78,10 @@ class EventsSuiteMessagingTest extends TestCase
'platform.test/api/smtp/messages/send' => Http::response(['success' => true]),
]);
$user = User::factory()->create(['public_id' => 'usr_mailer_suite']);
$user = User::factory()->create([
'public_id' => 'usr_mailer_suite',
'name' => 'Acme Events Ltd',
]);
$ok = app(EventMailer::class)->send(
$user->public_id,
'speaker@example.com',
@@ -89,6 +92,13 @@ class EventsSuiteMessagingTest extends TestCase
$this->assertTrue($ok);
$this->assertTrue(app(EventMailer::class)->isConfiguredForOwner($user->public_id));
Http::assertSent(function ($request) {
$data = $request->data();
return str_contains($request->url(), '/messages/send')
&& ($data['channel'] ?? null) === 'suite'
&& ($data['from_name'] ?? null) === 'Acme Events Ltd';
});
}
public function test_sms_service_uses_suite_when_platform_configured(): void