getParsedBody()->id ?? null; $targetList = $request->getParsedBody()->targetList ?? null; if (!$id || !is_array($targetList)) { throw new BadRequest(); } $this->getServiceFactory()->create('MassEmail')->processTest($id, $targetList); return true; } public function getActionSmtpAccountDataList() { if ( !$this->getAcl()->checkScope('MassEmail', 'create') && !$this->getAcl()->checkScope('MassEmail', 'edit') ) { throw new Forbidden(); } return $this->getServiceFactory()->create('MassEmail')->getSmtpAccountDataList(); } }