我已经尝试使用chilkat包在spyder(python 3.6)中使用imap连接gmail服务器。
我已为中的所有邮件启用了IMAP
设置>转发和POP/IMAP
然后我还启用了
不太安全的应用程序选项卡
在这里
https://myaccount.google.com/lesssecureapps?pli=1
在登录后。但在这个密码里
import sys
import chilkat
imap = chilkat.CkImap()
# Anything unlocks the component and begins a fully-functional 30-day trial.
success = imap.UnlockComponent("Anything for 30-day trial")
if (success != True):
print(imap.lastErrorText())
sys.exit()
# Connect to an IMAP server.
# Use TLS
imap.put_Ssl(True)
imap.put_Port(993)
success = imap.Connect("imap.gmail.com")
这个
success
变量是
boolean
仍然是假的。请帮帮我。我的目标是从outlook server获取所有附件并将其转储到一个文件中,但我甚至无法连接到gmail服务器。我试图使用“imap.mail.outlook.com”,但也失败了。我不知道在outlook中启用imap的步骤。但即使在gmail中启用了它,为什么它不能工作呢?