【问题标题】:Install poplib on Mac OS 10.10.5在 Mac OS 10.10.5 上安装 poplib
【发布时间】:2016-10-17 01:07:47
【问题描述】:

我尝试在我的 Mac 上安装 poplib,我尝试使用 Conda、pip 和 Homebrew,但我无法安装这个模块。 你有什么建议我可以尝试或替代模块吗? 我正在使用随 Anaconda 一起安装的 Python 3.5.1。 谢谢!

【问题讨论】:

  • 你有什么错误?

标签: macos python-3.5


【解决方案1】:

我用 impalib 解决了,用 smtplib 解决了一个错误,但现在我更卡住了...... 我无法通过 smtp 服务器进行身份验证,也无法连接到 imap 服务器。 这是我的代码:

    class EmailController:
      def __init__(self):
        # Check for connection, connect to servers.
        internetConnection = requests.get('http://www.google.com')
        while not internetConnection:
          internetConnection = requests.get('http://www.google.com')

        self.addrFrom = 'My address'

        print('connecting smtp')
        self.smtpServer = smtplib.SMTP('smtp-mail.outlook.com', 587)
        print('starting tls')
        self.smtpServer.starttls()
        print('authenticating')
        self.smtpServer.login(self.addrFrom, 'password') #Here it gets stuck

        print('connecting imap')
        self.imapServer = imaplib.IMAP4('imap-mail.outlook.com', 993) #Here is gets stuck too
        print('starting tls')
        self.imapServer.starttls()

可能是服务器还是我做错了什么?你如何在 imaplib 上启动 SSL 加密?

【讨论】:

    猜你喜欢
    • 2018-02-03
    • 2016-01-11
    • 2015-12-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-28
    • 1970-01-01
    • 2015-02-04
    相关资源
    最近更新 更多