SMTP through Exchange using Integrated Windows Authentication (NTLM) using Python

后端 未结 3 1140
没有蜡笔的小新
没有蜡笔的小新 2020-12-24 09:18

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

3条回答
  •  清酒与你
    2020-12-24 09:38

    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")
    

提交回复
热议问题