python 和 sll/Exchange 2007:找不到合适的身份验证方法

发布于 2024-08-10 20:16:06 字数 359 浏览 4 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘦怹 2024-08-17 20:16:06

您可能需要切换到 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文