Is there a proper way to add NTLM auth type into SwiftMailer using SwiftMailer bundle in symfony?
<p>I have symfony project with swiftMailer bundle. I was trying to send email via swiftmailer using NTLM auth. But I have not found a way to turn on NTLM via configuration of the bundle.</p>

<p>After struggling with it I have found solution</p>

<p><strong>First solution</strong></p>

<pre><code>current($this-&gt;get('mailer')-&gt;getTransport()-&gt;getExtensionHandlers())
    -&gt;setAuthenticators([new \Swift_Transport_Esmtp_Auth_NTLMAuthenticator()]);
</code></pre>

<p>Comment spool in config.yml</p>

<pre><code>#    spool:     { type: memory }
</code></pre>

<p>But it's look a little bit weird.</p>

<p><strong>Second solution</strong></p>

<p>Remove SwiftMailer bundle and use swiftMailer directly, because ntlm auth type activated by default.</p>

<p>Is there a better way to use NTLM auth type?</p>