Deploy Ladill Events / deploy (push) Successful in 41s
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>
34 lines
893 B
PHP
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)),
|
|
);
|
|
}
|
|
}
|