title: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
body: <p>I'm googling for how to this error a lot of hours. I've tried all solutions from <a href="https://stackoverflow.com/questions/1705856/socket-transport-ssl-in-php-not-enabled">this</a> topic without luck. <code>&lt;? phpinfo(); ?&gt;</code> (the only difference I'm using Appserver instead of IIS) it doesn't show anything realated to SSL. What else should I try?</p>
  
  <p>The full error message:</p>
  
  <pre><code>&lt;b&gt;Warning&lt;/b&gt;:  fsockopen() [&lt;a href='function.fsockopen'&gt;function.fsockopen&lt;/a&gt;]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport &amp;quot;ssl&amp;quot; - did you forget to enable it when you configured PHP?) in &lt;b&gt;C:\AppServ\www\webgitz\test\class.smtp.php&lt;/b&gt; on line &lt;b&gt;122&lt;/b&gt;&lt;br /&gt;
  SMTP -&gt; ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (27010016)
  </code></pre>
  
  <p>and code:</p>
  
  <pre><code>&lt;?php 
  
  require_once "validation.php";
  
  require_once "PHPMailer.php";
  
  
  require_once "class.smtp.php";
  
  $email= "foo@gmamcil.com";
  
  $mail = new PHPMailer();
  $mail-&gt;IsSMTP();
  $mail-&gt;SMTPAuth   = true; // enable SMTP authentication
  $mail-&gt;Port       =465;                    // set the SMTP server port
  $mail-&gt;Host = "smtp.gmail.com"; // GMAIL's SMTP server
  $mail-&gt;SMTPDebug = 2;
  $mail-&gt;SMTPSecure = 'ssl';
  $mail-&gt;Username   = "xxxxxx@gmail.com"; // GMAIL username
  $mail-&gt;Password   = "*********"; // GMAIL password
  $mail-&gt;AddReplyTo("XXXXX@gmail.com","AAAA"); // Reply email address
  $mail-&gt;From = "XXXX@gmail.com";
  $mail-&gt;FromName = "...."; // Name to appear once the email is sent
  $mail-&gt;Subject = "...."; // Email's subject
  $mail-&gt;Body = "Hello World,&lt;br /&gt;This is the HTML BODY&lt;br /&gt;"; //HTML Body
  $mail-&gt;AltBody = "..."; // optional, commentA out and test
  $mail-&gt;WordWrap = 50; // set word wrap
  $mail-&gt;MsgHTML($msg); // [optional] Send body email as HTML
  $mail-&gt;AddAddress("$email", "fooo");  // email address of recipient
  $mail-&gt;IsHTML(true); // [optional] send as HTML
  
  if(!$mail-&gt;Send()) echo 'ok'; else echo 'error';    
  ?&gt;
  </code></pre>