$to */ public function __construct( public readonly string $scenario, public readonly array $to, public readonly array $data = [], ) {} public function handle(EmailTemplateService $service, EmailTemplateRenderer $renderer): void { $template = $service->loadTemplate($this->scenario); $rendered = $renderer->render($template, $this->data); Mail::to($this->to)->send(new GenericTemplateMail( $rendered['subject'], $rendered['html'], $template->mailConfig(), $this->scenario, )); } }