title: Configure Symfony2/Swiftmailer to use "sendmail -t"
body: <p>I'm currently trying to get Symfony2/Swiftmailer to send the contents of a submitted form via mail. My parameters.yml contains the following:</p>
  
  <pre><code>mailer_transport: sendmail
  mailer_host: ~
  mailer_user: ~
  mailer_password: ~
  </code></pre>
  
  <p>Since the sendmail version on my server does not support the <code>-bs</code> option, which Swiftmailer seems to use by default, I have to find a way to tell Symfony2/Swiftmailer to use <code>sendmail -t</code> instead. <code>Swift_Transport_SendmailTransport</code> seems to support that, but there doesn't seem to be a corresponding configuration option for SwiftmailerBundle.</p>
  
  <p>How do I tell Swiftmailer to use <code>sendmail -t</code> (preferrably via configuration)?</p>
  
  <p><strong>Edit 2:</strong> For now, I'm using</p>
  
  <pre><code>$message = \Swift_Message::newInstance()
             […];
  
  $transport = $this-&gt;get('swiftmailer.mailer.default.transport.real');
  if ($transport instanceof \Swift_Transport_SendmailTransport) {
      $transport-&gt;setCommand('/usr/sbin/sendmail -t');
  }
  
  $this-&gt;get('mailer')-&gt;send($message);
  </code></pre>
  
  <p>I'm still wondering if there's a better way to do this, though.</p>