public function enviaProblema() { $data = $this->request->post(); $fachada = Fachada::getInstance(); //$id = $data['idusuario']; $id = (int) $fachada->decript($data["idusuario"]); if (is_nan($id)) { throw new InvalidArgumentException(); } $msg = $data['msg']; $vo = new ProblemaVO(); $vo->setIdUsuario($id); $vo->setMsg($msg); $fachada->insereProblema($vo); $userVO = new UsuarioVO(); $userVO->setIdUsuario($id); $userVO = $fachada->selectOneByID($userVO); $enviado = $fachada->sendEmail('*****@*****.**', $userVO->getEmail(), '[PROBLEMA] Saúde na Copa', $msg); $retorno = $this->getResponse($enviado); echo $retorno; }