title: php sending email smtp pear gmail without activated php_openssl.dll
body: <p>My code :</p>
  
  <pre><code>    require_once('C:\xampp\htdocs\jobs\protected\vendor\Mail-1.2.0\Mail.php');
  
      $from   = "s@gmail.com";
      $to         = "r@yahoo.com";
      $subject    = "Activation";
      $body   = "  Hi";
  
      $host   = "ssl://smtp.gmail.com";
      $username = "acc@gmail.com";
      $password = "password";
      $port   = "465";
  
      $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)) {
          $res['stat'] = false;
          $res['ket'] = $mail-&gt;getMessage();
      } else {
          $res['stat'] = true;
          $res['ket'] = true;
      }
      print_r($res);
  </code></pre>
  
  <p>It need enabling php_openssl.dll</p>
  
  <p>is there any some way without activated it in php.ini?</p>
  
  <p>or maybe activated by code in php..?</p>
  
  <p>*when i'm activated php_openssl.dll in php.ini it's work's, and i don't want to activated it directly and then restart the service..</p>