title: codeigniter send e-mail fails from real server
body: <p>i'm quite new to codeigniter .. i want to send e-mail from my server using e-mail library of CI.
  I made a code and it worked perfectly on the local host but not working on my server.</p>
  
  <p>This is my function in the controller : </p>
  
  <pre><code>public function send_task(){
      $config = Array(
        'protocol' =&gt; "smtp", //when you use gmail
        'smtp_host' =&gt; "smtp.googlemail.com",
        'smtp_port' =&gt; 465,
        'smtp_user' =&gt; "mediaclubegypt@gmail.com",
        'smtp_pass' =&gt; "******",
      );
  
      $config['crlf'] = '\r\n';
      $config['newline'] = '\r\n';
          $this-&gt;load-&gt;library('email', $config);
  
          $this-&gt;email-&gt;from('mediaclubegypt@gmail.com', 'Media Club - Sales');
          $this-&gt;email-&gt;to('mfareed2014@gmail.com');
          $this-&gt;email-&gt;subject('Sales System New Task');
          $this-&gt;email-&gt;message('Hi There');
  
          if($this-&gt;email-&gt;send()) {
              echo 'Email sent.';
          }else {
              show_error($this-&gt;email-&gt;print_debugger());
          }       
      }
  </code></pre>
  
  <p>and the error is : 
  <img src="https://i.stack.imgur.com/wY7hi.png" alt="enter image description here"></p>
  
  <p>I don't know what's wrong in this configurations . so i really need help.
  Thanks in advance :):) </p>