python 和 sll/Exchange 2007:找不到合适的身份验证方法
我正在尝试使用 smtplib 从 python 脚本发送电子邮件,并且通过 Exchange 2003 使用 smtp 没有任何问题,但使用 Exchange 2007 显示:
SMTPException: No suitable authentication method found.
Python 代码在两种情况下都是相同的(当然服务器和登录信息除外)。
我在脚本中以纯文本形式传递用户名和密码,看起来 Exchange 2007 未配置为与 AUTH_PLAIN = "PLAIN" (smtplib.py 的第 545 行)一起使用,并且我不知道在哪里禁用 ssl 。
将不胜感激任何想法。
I'm trying to send emails from a python script with smtplib, and it works with no problems with smtp through Exchange 2003, but with Exchange 2007 shows:
SMTPException: No suitable authentication method found.
Python code is the same in both cases (except server and login information of course).
I'm passing username and password in a script in plain text, and looks like Exchange 2007 is not configured to work with AUTH_PLAIN = "PLAIN" (line 545 of smtplib.py), and I don't know where to disable ssl there.
Would appreciate any ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要切换到 STARTTLS 身份验证。这是一个对我有帮助的例子。
如何通过 SMTPLIB 在 Python 中发送电子邮件
You might need to switch to STARTTLS authentication. Here's an example that helped me.
How To Send Email In Python Via SMTPLIB