title: Sending an email via gmail using Codeigniter and WAMP
body: <pre><code>            $config = Array(
              'protocol' =&gt; 'smtp',
              'smtp_host' =&gt; 'ssl://smtp.googlemail.com',
              'smtp_port' =&gt; 465,
              'smtp_user' =&gt; 'xxx',
              'smtp_pass' =&gt; 'xxx',
              'mailtype'  =&gt; 'html', 
              'charset'   =&gt; 'iso-8859-1'
          );
          $this-&gt;load-&gt;library('email', $config);
          $this-&gt;email-&gt;set_newline(&quot;\r\n&quot;);
  
          $this-&gt;email-&gt;from('me@gmail.com','me');
          $this-&gt;email-&gt;to($this-&gt;input-&gt;post('email'));
          $this-&gt;email-&gt;subject(&quot;Confirm your account.&quot;);
          
          $message = '&lt;p&gt;Thank you for signing up!&lt;/p&gt;';
          $message .= '&lt;p&gt;&lt;a href=&quot;';
          $message .= base_url();
          $message .= 'main/register_user';
          $message .= $key;
          $message .= '&quot;&gt;Click here!&lt;/a&gt;to sign up&lt;/p&gt;';
          $this-&gt;email-&gt;message($message);
  </code></pre>
  <p>I'm following some Codeigniter tutorials from phpacademy on youtube. One of the tutorials has you email a unique key to a user so they can register. I'm attempting to send via a gmail account, using other questions and CI forums I've gotten to the code above, but I get the following errors:</p>
  <blockquote>
  <p>Message: fsockopen() [function.fsockopen]: unable to connect to &gt;ssl://smtp.googlemail.com:465 (Unable to find the socket transport &quot;ssl&quot; - did you forget &gt;to enable it when you configured PHP?)</p>
  <p>Filename: libraries/Email.php</p>
  </blockquote>
  <p>--</p>
  <blockquote>
  <p>Message: fwrite() expects parameter 1 to be resource, boolean given</p>
  <p>Filename: libraries/Email.php</p>
  </blockquote>
  <p>--</p>
  <blockquote>
  <p>Message: fgets() expects parameter 1 to be resource, boolean given</p>
  <p>Filename: libraries/Email.php</p>
  </blockquote>
  <p>I'm lost as to the exact steps I need to take to set this up properly. Also, when I move this from local to an actual webhost will it still properly work with my gmail?</p>
  <p>Thank you very much.</p>