title: How to send email using CodeIgniter email class? I have Namecheap Open-Xchange
body: <p>I'm trying to send an email if the user forgot his password. But it is not sending.. This is my code in my controller:</p>
  
  <pre><code>function _send_email($type, $email, &amp;$data)
  {
      $this-&gt;load-&gt;library('email');
      $this-&gt;email-&gt;from($this-&gt;config-&gt;item('webmaster_email', 'tank_auth'), $this-&gt;config-&gt;item('website_name', 'tank_auth'));
      $this-&gt;email-&gt;reply_to($this-&gt;config-&gt;item('webmaster_email', 'tank_auth'), $this-&gt;config-&gt;item('website_name', 'tank_auth'));
      $this-&gt;email-&gt;to($email);
      $this-&gt;email-&gt;subject(sprintf($this-&gt;lang-&gt;line('auth_subject_'.$type), $this-&gt;config-&gt;item('website_name', 'tank_auth')));
      $this-&gt;email-&gt;message($this-&gt;load-&gt;view('email/'.$type.'-html', $data, TRUE));
      $this-&gt;email-&gt;set_alt_message($this-&gt;load-&gt;view('email/'.$type.'-txt', $data, TRUE));
      $this-&gt;email-&gt;send();
  }
  </code></pre>
  
  <p>What else do I need to set up to properly send this email? I have admin@domain.com account in open xchange.</p>