title: How to send email using template in Codeigniter
body: <p>I want to send email using template. I have tried this code but it gives this error.</p>
  
  <p><em>Severity: 4096
  Message: Object of class CI_Loader could not be converted to string</em></p>
  
  <p>My code is: </p>
  
  <pre><code>public function email_submit_change_password(){
      $this-&gt;load-&gt;library('email');
      $email = $this-&gt;input-&gt;post('email');   
  
      $check = $this-&gt;db-&gt;query("SELECT * FROM tbl_profile_main WHERE connect_to_email='".$email."';");
      if($check-&gt;result()!=NULL){
          $test = $this-&gt;load-&gt;view('includes/test');
          $this-&gt;email-&gt;from('itsthunder07@gmail.com', 'Your Name');
          $this-&gt;email-&gt;to($email);   
          $this-&gt;email-&gt;subject('Password Reset');
          $this-&gt;email-&gt;message($test);
          if($this-&gt;email-&gt;send()){
          $this-&gt;db-&gt;query("UPDATE tbl_profile_main SET token_='".$token."' WHERE connect_to_email='".$email."';");   
          $this-&gt;session-&gt;set_userdata('email_send','success');
          return 1;
          // return 5;
      }
      }else{
          $this-&gt;session-&gt;set_userdata('email_incorrect','error');
          return 0;
      }
  }
  </code></pre>