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

[eluser]kmunky[/eluser]
hi, i'm trying to send an html message but all i get is the html code as string not parsed html. here's my code:

Code:
function send(){
        
         $config = array(
            'type' => 'html'
          );
    
    //load parser library
    $this->load->library('parser');
    $email = $this->input->post("email");
    $data = array();
    
    $content = $this->parser->parse("invitatie_template",$data);
    
    $this->load->library('email',$config);
    //$this->email->initialize($config);    
  
    $this->email->from('[email protected]', 'name');
    $this->email->to($email);

    $this->email->subject('title');
    
    
    $this->email->message($content);    

    
    $this->email->send();  
    
    $this->load->view("mail_form");
    
    
    }
#2

[eluser]umefarooq[/eluser]
hi you have to define mail type either html or just text message check you config is wrong

Code:
$config = array('mailtype'=>'html');

not only type




Theme © iAndrew 2016 - Forum software by © MyBB