getParsedBody()->id ?? null; $targetList = $request->getParsedBody()->targetList ?? null; if (!$id || !is_array($targetList)) { throw new BadRequest(); } $this->getMassEmailService()->processTest($id, $targetList); return true; } /** * @return stdClass[] * @throws Forbidden */ public function getActionSmtpAccountDataList(): array { if ( !$this->getAcl()->checkScope('MassEmail', 'create') && !$this->getAcl()->checkScope('MassEmail', 'edit') ) { throw new Forbidden(); } return $this->getMassEmailService()->getSmtpAccountDataList(); } private function getMassEmailService(): Service { /** @var Service */ return $this->getServiceFactory()->create('MassEmail'); } }