Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Commit ba924e8

Browse files
committed
feature #188 Add support for ntlm auth_mode (mleko)
This PR was merged into the 3.0-dev branch. Discussion ---------- Add support for ntlm auth_mode Commits ------- 4d04721 Add support for ntlm auth_mode
2 parents 556ef62 + 4d04721 commit ba924e8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

DependencyInjection/SwiftmailerTransportFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public static function createTransport(array $options, RequestContext $requestCo
3939
new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(),
4040
new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(),
4141
new \Swift_Transport_Esmtp_Auth_PlainAuthenticator(),
42+
new \Swift_Transport_Esmtp_Auth_NTLMAuthenticator()
4243
));
4344
$smtpAuthHandler->setUsername($options['username']);
4445
$smtpAuthHandler->setPassword($options['password']);
@@ -146,7 +147,7 @@ public static function validateConfig($options)
146147
throw new \InvalidArgumentException(sprintf('The %s encryption is not supported', $options['encryption']));
147148
}
148149

149-
if (!in_array($options['auth_mode'], array('plain', 'login', 'cram-md5', null), true)) {
150+
if (!in_array($options['auth_mode'], array('plain', 'login', 'cram-md5', 'ntlm', null), true)) {
150151
throw new \InvalidArgumentException(sprintf('The %s authentication mode is not supported', $options['auth_mode']));
151152
}
152153
}

Resources/config/schema/swiftmailer-1.0.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
<xsd:enumeration value="plain" />
9191
<xsd:enumeration value="login" />
9292
<xsd:enumeration value="cram-md5" />
93+
<xsd:enumeration value="ntlm" />
9394
</xsd:restriction>
9495
</xsd:simpleType>
9596

0 commit comments

Comments
 (0)