Files
ladill-events/app/Services/Events/EventEmailService.php
T
isaaccladandCursor 06fedcfc55
Deploy Ladill Events / deploy (push) Successful in 41s
Add virtual event sessions with Meet sync and platform-billed messaging.
Events can define hybrid/virtual sessions synced to Meet rooms; SMS and email use wallet-billed platform APIs instead of Termii and Laravel mail.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 22:08:09 +00:00

34 lines
893 B
PHP

<?php
namespace App\Services\Events;
use App\Services\Billing\PlatformEmailClient;
use Illuminate\Support\Facades\View;
class EventEmailService
{
public function __construct(private readonly PlatformEmailClient $platform) {}
public function sendProgrammeShare(
string $ownerPublicId,
string $to,
string $eventName,
string $programmeUrl,
?string $attendeeName = null,
): bool {
$html = View::make('mail.notifications.event-programme', [
'eventName' => $eventName,
'programmeUrl' => $programmeUrl,
'attendeeName' => $attendeeName,
])->render();
return $this->platform->send(
$ownerPublicId,
$to,
'Programme for '.$eventName,
$html,
strip_tags(str_replace(['<br>', '<br/>', '<br />'], "\n", $html)),
);
}
}