title: Sending html email in Codeigniter
body: <p>I am sending a template html in codeigniter and in fact my email is working perfectly fine.</p>
  
  <p>My problem is how i send a template of html to the email. I got an error because of the variables passed to.</p>
  
  <pre><code>public function send_email_accountability($C11, $C4, $C8,$C12)
  {
      date_default_timezone_set('Asia/Manila');
      $message = $this-&gt;load-&gt;view('sample_html',$data,TRUE); 
      $this-&gt;load-&gt;library('email');
      $this-&gt;email-&gt;set_mailtype("html");
      $this-&gt;email-&gt;from('noreply@email.com', 'EMAIL');
      $this-&gt;email-&gt;to($C11); 
      $this-&gt;email-&gt;subject('Accountability for'. $C12);
      $this-&gt;email-&gt;message($message);
  }
  </code></pre>
  
  <p>I receive the email but inside the email is php error because the <code>$data</code> cannot be passed to. I looked at other stackoverflow problems and it didn't help my problem.</p>