title: Can not send mail with the gmail smtp and the swift mailer
body: <p>I cant send the email message via gmail smtp on swift mailer, here is the code:</p>
  <pre><code>&lt;?php
  
  require_once 'inc/swift_mailer/lib/swift_required.php';
  $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')
    -&gt;setUsername('mysen2@gmail.com')
    -&gt;setPassword('bestpasswordever')
    ;
  $transport-&gt;setLocalDomain('[127.0.0.1]');
  $mailer = Swift_Mailer::newInstance($transport);
  
  $message = Swift_Message::newInstance($transport)
    -&gt;setSubject('Test Mail')
    -&gt;setFrom(array('mysen2@gmail.com' =&gt; 'John Doe'))
    -&gt;setTo(array('testin3@gmail.com'))
    -&gt;setBody('This is the test message.')
    -&gt;addPart('&lt;q&gt;Here is the message itself&lt;/q&gt;', 'text/html');
    
      if (!$mailer-&gt;send($message, $failures))
      {
          die(&quot;Errors occurred:&lt;br/&gt;&quot; . $failures);
      }
  
  ?&gt;
  </code></pre>
  <p>And the error message:</p>
  <blockquote>
  <p>Fatal error: Uncaught exception 'Swift_TransportException' with
  message 'Connection could not be established with host smtp.gmail.com
  [Unable to find the socket transport &quot;ssl&quot; - did you forget to enable
  it when you configured PHP? #-27264]' in
  /swift_mailer/lib/classes/Swift/Transport/StreamBuffer.php:266
  Stack trace: #0
  /swift_mailer/lib/classes/Swift/Transport/StreamBuffer.php(66):
  Swift_Transport_StreamBuffer-&gt;_establishSocketConnection() #1
  /swift_mailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(117):
  Swift_Transport_StreamBuffer-&gt;initialize(Array) #2
  /swift_mailer/lib/classes/Swift/Mailer.php(79):
  Swift_Transport_AbstractSmtpTransport-&gt;start() #3
  /usr/local/www/data/mail.php(19):
  Swift_Mailer-&gt;send(Object(Swift_Message), Array) #4 {main} thrown in
  /swift_mailer/lib/classes/Swift/Transport/StreamBuffer.php
  on line 266</p>
  </blockquote>
  <p>I guess its a problem with my server not containing the open ssl library:</p>
  <blockquote>
  <p>[Unable to find the socket transport &quot;ssl&quot; - did you forget to enable
  it when you configured PHP?</p>
  </blockquote>
  <p>How can I fix that , then?</p>
  <h1>also</h1>
  <p>Is using gmails SMTP good for sending like 50-100 mails per day? Or I should use something else (you're free to suggest and give me some tips)?</p>