title: Enable to send mails with Swiftmailer
body: <p>I'm using <code>Swiftmailer</code> with <code>Symfony 2.8</code> to send mails from a gmail account to an outlook account.
  The code I'm using in my controller:</p>
  
  <pre><code>$message = \Swift_Message::newInstance()
      -&gt;setSubject('Test Email')
      -&gt;setFrom('xxxxx@xxxxx.com')
      -&gt;setTo('xxxxxx@outlook.com')
      -&gt;setBody(
          $this-&gt;renderView(
  
              'QualifBundle:Mails:Welcome.html.twig'
              ),
          'text/html'
      );
  $this-&gt;get('mailer')-&gt;send($message);
  </code></pre>
  
  <p>Configuration file:</p>
  
  <pre><code># Swiftmailer Configuration
  swiftmailer:
      transport: %mailer_transport%
      encryption: %mailer_encryption%
      auth_mode:  %mailer_auth_mode%
      host:      %mailer_host%
      username:  %mailer_username%
      password:  %mailer_password%
      spool:     { type: memory }
  </code></pre>
  
  <p>Parameters yml:</p>
  
  <pre><code>mailer_username: xxxxxxx@gmail.com
  mailer_password: xxxxxxxxx
  mailer_transport:  smtp
  mailer_encryption: ssl
  mailer_auth_mode:  login
  mailer_host: smtp.gmail.com
  </code></pre>
  
  <p>I managed to solve SSL errors, now with this code my app runs without exceptions but the mail is not received ( maybe not even been send )
  How can I solve or fingerprint this ?</p>
  
  <p><strong>Update</strong>
  I removed <code>spool:{ type: memory }</code> so that mails get send directly and I got this exception.</p>
  
  <pre><code>Connection could not be established with host 127.0.0.1 [Connection refused #111] 
  </code></pre>
  
  <p>My Host is supposed to be <code>smtp.gmail.com</code> not the <code>localhost</code> any idea ?</p>
  
  <p><strong>Solution</strong>
  I solved my problem by hacking into vendor's files, I know it's not the best solution but at least I can send mails.</p>
  
  <p>look for <code>_establishSocketConnection()</code> fonction in <code>StreamBuffer.php</code> should be in this path <code>/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport</code> into the project.
  And add those following lines to escape SSL verification:</p>
  
  <pre><code>//...
  $options = array();
  if (!empty($this-&gt;_params['sourceIp'])) {
      $options['socket']['bindto'] = $this-&gt;_params['sourceIp'].':0';
  }
  //Add those two lines
  $options['ssl']['verify_peer'] = FALSE;
  $options['ssl']['verify_peer_name'] = FALSE;
  //...
  </code></pre>
  
  <p>Then I restarted the browser I mailing works like a charm</p>