SMTP through Exchange using Integrated Windows Authentication (NTLM) using Python
问题 I want to use the credentials of the logged-in Windows user to authenticate an SMTP connection to an Exchange server using NTLM. I'm aware of the python-ntlm module and the two patches that enable NTLM authentication for SMTP, however I want to use the current user's security token and not have to supply a username and password. Very similar problem to Windows Authentication with Python and urllib2. 回答1: Although the solution below only uses the Python Win32 extensions (the sspi example code