Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($this->agent->is_browser()){
- $agent = $this->agent->browser().' '.$this->agent->version();
- }elseif($this->agent->is_robot()){
- $agent = $this->agent->robot();
- }elseif ($this->agent->is_mobile()){
- $agent = $this->agent->mobile();
- }else{
- $agent = 'Não foi identificado o User Agent';
- }
- $mensagem = '
- <!DOCTYPE html>
- <html lang="pt-BR">
- <head>
- <meta charset="UTF-8">
- <title>Contato pelo Site via E-mail '.date("d/m/Y").'-'.date("H:i").'</title>
- </head>
- <body>
- <h1>Contato pelo Site via E-mail '.date("d/m/Y").'-'.date("H:i").' para Envio de Currículo</h1>
- <p><b>Nome:</b> '.$this->input->post('nome').'</p>
- <p><b>Telefone:</b> '.$this->input->post('telefone').'</p>
- <p><b>E-mail:</b> '.$this->input->post('email').'</p>
- <p>Caso o currículo não esteja em anexo, faça o download <a href="'.site_url('assets/curriculo/'.$nome_curriculo).'" title="Clique e veja o arquivo">'.site_url('assets/curriculo/'.$nome_curriculo).'</a>.</p>
- <p><b>Acessado via:</b> '.$agent.' | <b>Plataforma:</b> '.$this->agent->platform().' | <b>IP:</b> '.$this->input->ip_address().'</p>
- </body>
- </html>';
- $this->email->reply_to($this->input->post('email'), $this->input->post('nome'));
- //$this->email->bcc('[email protected]');
- $this->email->subject('Envio de Currículo - '.date("d/m/Y").'-'.date("H:i"));
- $this->email->message($mensagem);
- $this->email->attach(site_url('assets/curriculo/'.$nome_curriculo), 'attachment', $this->input->post('nome').'.pdf', 'application/pdf');
- if($this->email->send()){
- redirect('Contato/Trabalhe_Conosco/Sucesso');
- }else{
- // echo $this->email->print_debugger();
- // echo $mensagem;
- redirect('Contato/Trabalhe_Conosco/ErroEmail');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement