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
@@ -133,6 +133,8 @@ class EventEmailService
$brandingSettings = AccountBranding::forOwnerRef($ownerPublicId);
$viewData['logoUrl'] = AccountBranding::emailLogoUrl($brandingSettings);
$viewData['companyName'] = AccountBranding::companyName($brandingSettings);
// From display: organizer name, else account/company branding — never "Ladill Events".
$fromName = trim((string) ($replyToName ?: $viewData['companyName'] ?? '')) ?: null;
$html = View::make($view, $viewData)->render();
$text = strip_tags(str_replace(['<br>', '<br/>', '<br />'], "\n", $html));
@@ -145,6 +147,7 @@ class EventEmailService
$text,
$replyToEmail,
$replyToName,
$fromName,
);
}
}