cgView = new CgView(); $this->cgView->viewPath = KERNEL_DIR . "/views/mailing/"; $this->data = $data; $this->SMTP = new SMTP(); $this->init(); } /** * @throws Exception */ public function send_html(string $tpl, array $tplParams, array $mailParams): ?false { $mailParams['body'] = $this->cgView->fetch($tpl, $tplParams); return $this->SMTP->send_html($mailParams); } public function run() { } public static function create(array $data = []): static { return new static($data); } protected function init() { } }