gopython3 在 记一次Python(imaplib)读取邮件(126/163)时出现"SELECT Unsafe Login"错误解决 中发帖
最近一个小需求, 需要批量修改某服务的联系邮箱, 提供过来的邮箱又都是126/163邮箱.
需求是登录原账号, 修改邮箱, 需要用新的邮箱接收验证码, 由于需要批量修改, 使用Playwright进行处理, 但在测试imap收信时出现了以下问题:
SELECT Unsafe Login. Please contact kefu@188.com for help
一顿摸索, 还是在茫茫google数据库中找到了解决方案.
| 原代码:
import imaplib
def pop3_test(server: str, username: str, password: str):
mail = imaplib.IMAP4_SSL(server)
mail.login(username, password)
try:
status, mes...