php - Corrupt PDF on the fly attached to email via dompdf -
i'm trying attach pdf on fly send via email, i'm getting corrupted when download there. tried put inside .zip, didn't change status of .pdf itself.
here's code:
//email para o cliente $this->load->library('email'); $config['newline'] = "\r\n"; $this->email->from('contato@avanhandava.org', 'avanhandava'); $this->email->to($this->input->post('email')); $this->email->subject('inscrição para o acampô'); $this->email->message($this->input->post('nome').','."\r\n"."\r\n".'sua inscrição foi realizada com sucesso! segue anexa sua ficha de inscrição, que deve ser impressa, assinada e entregue à marli (xxxx-xxxx).'."\r\n".'caso haja algum erro na ficha, basta acessar página inicial e inserir o rg inscrito para editá-la.'."\r\n"."\r\n".'obrigado,'."\r\n"."\r\n".'avanhandava'); $this->load->helper(array('dompdf', 'file')); $this->load->view('ps_retorno', $preco, true); pdf_create(blablabla in html integrating db sucess, inscricao); write_file('inscricao.pdf'); $this->email->attach('inscricao.pdf'); $this->email->send(); any ideas?
Comments
Post a Comment