title: SMTP: Failed to connect socket: Unable to find the socket transport "ssl"
body: <p>I've been trying to get to be able to send emails with Pear on WAMP <em>through GMail</em>, and after spending hours setting it all up and figuring out all the errors I was getting, I thought I was so close, until I started getting this error:</p>
  
  <pre><code>Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (code: -1, response: )]
  </code></pre>
  
  <p>Using this code:</p>
  
  <pre><code>&lt;?php require_once "info.php"; require_once "Mail.php"; // info.php contains the variable $password
  $from = "Me &lt;myemail@gmail.com&gt;";
  $to = "Me &lt;myemail@gmail.com&gt;";
  $subject = "Hi!";
  $body = "Hi,\n\nHow are you?";
  
  $host = "ssl://smtp.gmail.com";
  $port = "465";
  $username = "myemail@gmail.com";
  $password = "$password";
  
  $headers = array ('From' =&gt; $from,
  'To' =&gt; $to,
  'Subject' =&gt; $subject);
  $smtp = Mail::factory('smtp',
  array ('host' =&gt; $host,
   'port' =&gt; $port,
   'auth' =&gt; true,
   'username' =&gt; $username,
   'password' =&gt; $password));
  
  $mail = $smtp-&gt;send($to, $headers, $body);
  
  if (PEAR::isError($mail)) {
  echo("&lt;p&gt;" . $mail-&gt;getMessage() . "&lt;/p&gt;");
  } else {
  echo("&lt;p&gt;Message successfully sent!&lt;/p&gt;");
  }
  ?&gt;
  </code></pre>
  
  <p>I've gone through and uncommented <code>extension=php_openssl.dll</code> in the (correct) php.ini, and made sure that the <code>extension_dir</code> was pointing to the DLLs.  I've used <code>phpinfo();</code> and I've seen multiple mentions of SSL:</p>
  
  <p>I see <code>mod_ssl</code> in <code>Loaded Modules</code>.</p>
  
  <p>Under the <code>mysqlnd</code> heading it has an entry <code>SSL: supported</code>.</p>
  
  <p>And under the <code>Phar</code> heading there's the entry <code>Native OpenSSL support: enabled</code>.</p>
  
  <p>I've also turned off my firewall, just to check, I've restarted my computer, and I've checked practically every question like mine on this site, and I still haven't found a solution.</p>
  
  <p>I'm at a loss of what to do next.  What do I need to enable/check to get it working?</p>