diff --git a/.env.example b/.env.example index 191c74f..10d4208 100644 --- a/.env.example +++ b/.env.example @@ -56,8 +56,8 @@ MAIL_HOST=127.0.0.1 MAIL_PORT=587 MAIL_USERNAME= MAIL_PASSWORD= -MAIL_FROM_ADDRESS=events@ladill.com -MAIL_FROM_NAME="Ladill Events" +MAIL_FROM_ADDRESS=noreply@ladill.com +MAIL_FROM_NAME=Ladill # Legacy Bird SMTP API (unused for attendee/speaker mail; kept for future Bird integration) SMTP_PLATFORM_API_URL=https://ladill.com/api/smtp diff --git a/app/Services/Events/EventEmailService.php b/app/Services/Events/EventEmailService.php index facea97..918da60 100644 --- a/app/Services/Events/EventEmailService.php +++ b/app/Services/Events/EventEmailService.php @@ -28,7 +28,6 @@ class EventEmailService 'Programme for '.$eventName, 'mail.notifications.event-programme', compact('eventName', 'programmeUrl', 'attendeeName'), - $eventName, $organizerEmail, $organizerName, ); @@ -49,7 +48,6 @@ class EventEmailService 'Join '.$eventName, 'mail.notifications.event-join', compact('eventName', 'joinUrl', 'attendeeName'), - $eventName, $organizerEmail, $organizerName, ); @@ -71,7 +69,6 @@ class EventEmailService $eventName.' — programme & join link', 'mail.notifications.event-join-programme', compact('eventName', 'joinUrl', 'programmeUrl', 'attendeeName'), - $eventName, $organizerEmail, $organizerName, ); @@ -93,7 +90,6 @@ class EventEmailService 'Registration confirmed — '.$eventName, 'mail.notifications.event-registration-confirmed', compact('eventName', 'badgeCode', 'joinUrl', 'attendeeName'), - $eventName, $organizerEmail, $organizerName, ); @@ -118,7 +114,6 @@ class EventEmailService 'portalUrl' => $portalUrl, 'speakerName' => $speakerName, ], - $eventName, $organizerEmail, $organizerName, ); @@ -131,7 +126,6 @@ class EventEmailService string $subject, string $view, array $viewData, - ?string $fromDisplayName = null, ?string $replyToEmail = null, ?string $replyToName = null, ): bool { @@ -144,7 +138,6 @@ class EventEmailService $subject, $html, $text, - $fromDisplayName, $replyToEmail, $replyToName, ); diff --git a/app/Services/Events/EventMailer.php b/app/Services/Events/EventMailer.php index 8bb6847..cf51dad 100644 --- a/app/Services/Events/EventMailer.php +++ b/app/Services/Events/EventMailer.php @@ -8,8 +8,8 @@ use Illuminate\Support\Facades\Mail; use Illuminate\Support\Str; /** - * Sends Ladill Events transactional email from the platform mailer (like Invoice), - * not the event owner's Bird SMTP domain. Reply-To is set to the organiser. + * Sends Ladill Events transactional email via the platform mailer + * (noreply@ladill.com — same as CRM and other Ladill apps). */ class EventMailer { @@ -35,7 +35,6 @@ class EventMailer string $subject, string $html, ?string $text = null, - ?string $fromDisplayName = null, ?string $replyToEmail = null, ?string $replyToName = null, ): bool { @@ -56,12 +55,12 @@ class EventMailer $reference = 'events_email:'.Str::uuid(); try { - Mail::html($html, function ($message) use ($to, $subject, $text, $fromDisplayName, $replyToEmail, $replyToName): void { + Mail::html($html, function ($message) use ($to, $subject, $text, $replyToEmail, $replyToName): void { $message->to($to) ->subject($subject) ->from( (string) config('mail.from.address'), - $fromDisplayName ?: (string) config('mail.from.name'), + (string) config('mail.from.name'), ); if ($replyToEmail) { diff --git a/tests/Feature/EventSpeakerInviteTest.php b/tests/Feature/EventSpeakerInviteTest.php index 14a185b..4ae8b9a 100644 --- a/tests/Feature/EventSpeakerInviteTest.php +++ b/tests/Feature/EventSpeakerInviteTest.php @@ -20,8 +20,8 @@ class EventSpeakerInviteTest extends TestCase $this->withoutMiddleware(\App\Http\Middleware\EnsurePlatformSession::class); config([ - 'mail.from.address' => 'events@ladill.com', - 'mail.from.name' => 'Ladill Events', + 'mail.from.address' => 'noreply@ladill.com', + 'mail.from.name' => 'Ladill', 'events.service_api_keys.meet' => 'test-meet-key', ]);