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.
After struggling with it I have found solution
First solution
current($this->get('mailer')->getTransport()->getExtensionHandlers())
->setAuthenticators([new \Swift_Transport_Esmtp_Auth_NTLMAuthenticator()]);
Comment spool in config.yml
# spool: { type: memory }
But it's look a little bit weird.
Second solution
Remove SwiftMailer bundle and use swiftMailer directly, because ntlm auth type activated by default.
Is there a better way to use NTLM auth type?
I created pull request which got approved.
Since version v3.0.4
you can use
auth_mode: ntlm
You can install v3.0.4
version using command
composer require symfony/swiftmailer-bundle:^3.0.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With