title: Issue with sending mail in Tank Auth
body: <p>I'm using WAMP Server on windows 7 and trying to configure Tank Auth with code Igniter.</p>
  
  <p>While registration, Screen stuck on browser. I checked database that user was successfully inserted. With some debug, I was able to find that code is getting stuck while sending mail in <code>_send_email</code> function on Tank Auth's controller. Below is the code with debug statements.</p>
  
  <pre><code>function _send_email($type, $email, &amp;$data)
  {
      echo "In _send_email";
  
      $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));
  
      echo "Before Sending";//exit;
  
      $this-&gt;email-&gt;send();
  
      echo "Mail Sent";
      echo $this-&gt;email-&gt;print_debugger();exit;
  }
  </code></pre>
  
  <p>When I put <code>exit</code> before <code>$this-&gt;email-&gt;send();</code>, code worked fine but stuck as soon as I remove that exit. Clear indication that send() method is having problems.</p>
  
  <p>I wrote another cotroller to test email as follow</p>
  
  <pre><code>public function view($slug){
  
      $this-&gt;load-&gt;library('email');
      $this-&gt;email-&gt;from('Myemail1', 'Kapil Sharma');
      $this-&gt;email-&gt;to('myemail2');
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;subject('Email Test');
      $this-&gt;email-&gt;message('Testing the email class.&lt;br&gt;New Line.&lt;br&gt;&lt;strong&gt;Strong&lt;/strong&gt;');
      $this-&gt;email-&gt;send();
  
      $data['title'] = $data['news']['title'];
  
      $this-&gt;load-&gt;view('templates/header', $data);
      $this-&gt;load-&gt;view('news/view.html', $data);
      $this-&gt;load-&gt;view('templates/footer');
  }
  </code></pre>
  
  <p>Which sent the mail successfully. Here is my email.php config, if needed</p>
  
  <pre><code>$config = Array(
      'protocol' =&gt; 'smtp',
      'smtp_host' =&gt; 'ssl://smtp.googlemail.com',
      'smtp_port' =&gt; 465,
      'smtp_user' =&gt; 'myemail@gmail.com', //This is correct
      'smtp_pass' =&gt; 'mypassword',  //This is correct
      'mailtype' =&gt; 'html'
  );
  </code></pre>
  
  <p>Can someone please identify what is the issue. Why sending email is not working in Tank Auth's Controller but working fine in another test controller. I cross checked both tank auth config file and english under lang is available.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I updated subject line in <code>_send_email</code> as follow</p>
  
  <pre><code>//$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;subject('Test sub');
  </code></pre>
  
  <p>and code is working now. It seems there is some problem with lang. Checking if I can figure out the issue. Can someone quickly suggest why there is issue in <code>$this-&gt;lang-&gt;line</code> method.</p>