title: Error in sending email all the solutions doesn't work
body: <p>hello every one i have big problem
   i'am using codeigniter and i am working now to sent an email</p>
  
  <p>this is my controller code</p>
  
  <p>
  
  <p>class Email extends CI_Controller {</p>
  
  <pre><code>function index()
  {
      $config = Array(
          'protocol' =&gt; 'smtp',
          'smtp_host' =&gt; 'ssl://smtp.gmail.com',
          'smtp_port'=&gt; 465,
          'smtp_user' =&gt; 'xxxxxx@gmail.com',
          'smtp_pass' =&gt; 'xxxxxxxxx',
          'mailtype'  =&gt; 'html',
                      'starttls'  =&gt; true,
                      'newline'   =&gt; "\r\n"
  
      );
  
      $this-&gt;load-&gt;library('email',$config);
  
      $this-&gt;email-&gt;from('xxxxxx@gmail.com','xxxx');
      $this-&gt;email-&gt;to('xxxxxxx@gmail.com');
      $this-&gt;email-&gt;subject('this is an email test');
      $this-&gt;email-&gt;message('it is working');
      $this-&gt;email-&gt;send();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>i activate php_openssl and the port in php.ini is 25
  and i have those errors</p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Warning
  
  Message: fsockopen(): php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
  
  Filename: libraries/Email.php
  
  Line Number: 1689
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fsockopen(): unable to connect to ssl://smtp.googleemail.com:465 (php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. )
  
  Filename: libraries/Email.php
  
  Line Number: 1689
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fwrite() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1846
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fgets() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1869
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fwrite() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1846
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fgets() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1869
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fwrite() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1846
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fgets() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1869
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fwrite() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1846
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fgets() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1869
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fwrite() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1846
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fwrite() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1846
  
  A PHP Error was encountered
  
  Severity: Warning
  
  Message: fgets() expects parameter 1 to be resource, boolean given
  
  Filename: libraries/Email.php
  
  Line Number: 1869
  </code></pre>
  
  <p>any help please ,with all respect</p>