fix(email): use client/org name as From display, not Ladill product
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:
isaacclad
2026-07-16 12:01:22 +00:00
parent 4647fd97e0
commit 17d888fdf7
3 changed files with 12 additions and 2 deletions
+7
View File
@@ -4,6 +4,7 @@ namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -23,7 +24,13 @@ class ContactMessageMail extends Mailable
public function envelope(): Envelope
{
$display = trim((string) ($this->fromName ?: $this->companyName));
$fromAddress = (string) config('mail.from.address');
return new Envelope(
from: $display !== '' && $fromAddress !== ''
? new Address($fromAddress, $display)
: null,
subject: $this->subjectLine,
replyTo: $this->replyToAddress ? [$this->replyToAddress] : [],
);