fix(email): use client/org name as From display, not Ladill product
Deploy Ladill Queue / deploy (push) Successful in 43s
Deploy Ladill Queue / deploy (push) Successful in 43s
Customer-facing outbound mail should appear from the business (organizer, clinic, company, location), not the Ladill product brand.
This commit is contained in:
@@ -27,9 +27,11 @@ class EmailService
|
||||
$logoUrl = OrganizationBranding::emailLogoUrl($organization);
|
||||
$companyName = $organization->name;
|
||||
}
|
||||
// Client-facing From display: org/company name, never the Ladill product brand.
|
||||
$displayName = trim((string) ($fromName ?: $companyName)) ?: null;
|
||||
|
||||
try {
|
||||
Mail::to($to)->send(new ContactMessageMail($subject, $body, $fromName, $replyTo, $logoUrl, $companyName));
|
||||
Mail::to($to)->send(new ContactMessageMail($subject, $body, $displayName, $replyTo, $logoUrl, $companyName));
|
||||
|
||||
return true;
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
@@ -77,7 +77,8 @@ class QueueNotificationService
|
||||
$this->sms->send($phone, $message);
|
||||
}
|
||||
if ($email) {
|
||||
$this->email->send($email, 'Ladill Queue update', $message, null, null, $organization);
|
||||
$orgName = trim((string) ($organization?->name ?? '')) ?: 'Queue';
|
||||
$this->email->send($email, $orgName.' — queue update', $message, $orgName, null, $organization);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user