title: Cannot Send MAIL using CODEIGNITER
body: <p>I've been searching information on this but can't find any. Here is my code (from controller):</p>
  
  <pre><code>public function send_mail(){
      $config = Array(
          'protocol' =&gt; 'smtp',
          'smt_host' =&gt; 'ssl://smtp.gmail.com',
          'smtp_port' =&gt; '465',
          'smtp_user' =&gt; 'mymail@gmail.com',
          'smtp_pass' =&gt; 'password',
          'charset' =&gt; 'iso-8859-1',
          'wordwrap' =&gt; TRUE
      );
  
      $this-&gt;load-&gt;library('email');
      $this-&gt;email-&gt;initialize($config);
  
      $this-&gt;email-&gt;set_newline("\r\n");
  
          $this-&gt;email-&gt;from('mymail@gmail.com', 'MyName');
          $this-&gt;email-&gt;to('mymail@gmail.com');
  
          $this-&gt;email-&gt;subject('Message');
          $this-&gt;email-&gt;message('Some text.');
  
          if ($this-&gt;email-&gt;send())
              echo "twas sent";
          else show_error ($this-&gt;email-&gt;print_debugger());      
  }
  </code></pre>
  
  <p>Now the error I get from debugger is:</p>
  
  <pre><code>You did not specify a SMTP hostname.
  Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
  
  Date: Tue, 9 May 2017 22:16:37 +0200
  From: "MyName" &lt;mymail@gmail.com&gt;
  Return-Path: &lt;mymail@gmail.com&gt;
  To: mymail@gmail.com
  Subject: =?ISO-8859-1?Q?=47=65=74=47=61=69=6E=73=20=4D=65=73=73=61=67=65?=
  Reply-To: &lt;mymail@gmail.com&gt;
  User-Agent: CodeIgniter
  X-Sender: mymail@gmail.com
  X-Mailer: CodeIgniter
  X-Priority: 3 (Normal)
  Message-ID: &lt;591223a537e10@gmail.com&gt;
  Mime-Version: 1.0
  
  
  Content-Type: text/plain; charset=ISO-8859-1
  Content-Transfer-Encoding: 8bit
  
  Some text.
  </code></pre>
  
  <p>The thing is I cannot understand how did I not specify SMTP hostname? I've tried ports like 465 and 587, tried hosts like 'ssl://smtp.gmail.com', 'ssl://smtp.googlemail.com', 'smtp.gmail.com', etc. </p>
  
  <p>P.S. Instead of mymail@gmail.com and password stands my real gmail with password. </p>