Welcome Guest, Not a member yet? Register   Sign In
built email html
#1

[eluser]tnathos[/eluser]
hi.. i try to build a message html but always the email is text... dont show me a image and dont apply the tags html...

this the code

Code:
$mensaje = "Adjunto encontrarasla informacion generado para la promocion seleccionada, si no tienes impresora puedes presentar el siguiente codigo con el cual tendras acceso a la promocion </br> \n";
        
        $mensaje .= "Codigo = ". $cod_k. "</br> \n";
        
        $mensaje .= '<img src="http://localhost:8888/app/system/files/img/logo.png">';
    

        $this->load->library('email');
        $config['charset'] = 'iso-8859-1';
        $config['wordwrap'] = TRUE;
        $config['protocol'] = 'mail';
        $config['mail_type'] = 'html';
        
        $this->email->initialize($config);
        
        $this->email->from('[email protected]');
        $this->email->to($emailk);
        $this->email->set_newline("\r\n");
        
        $this->email->subject('new message');
        $this->email->message($mensaje);
        

        return $this->email->send();
#2

[eluser]Ben Edmunds[/eluser]
$mensaje needs to be a complete html page with &lt;html&gt;, &lt;body&gt;, etc...

I like to build a view and then simply load the view into the email.




Theme © iAndrew 2016 - Forum software by © MyBB