fix(email): use client/org name as From display, not Ladill product
Deploy Ladill Events / deploy (push) Successful in 45s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user