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
Great answer but as an update for python 3
def asbase64(msg): # encoding the message then convert to string return base64.b64encode(msg).decode("utf-8")