zhangyunhao116 / zmail

Zmail makes it easier to send and retrieve emails in python3
MIT License
433 stars 111 forks source link

occur error "CRITICAL:zmail:<POPServer username:xxx@sina.com password:xxx pop.sina.com:995 ssl:True tls:False> duplicate login!"" #85

Open yonkylin opened 4 years ago

yonkylin commented 4 years ago

my code like this:
while True: try:

        mails = server.get_mails(start_time=newTime,sender=my_sender)
        # mail = server.get_latest()
        if len(mails) > 0:
            for m in mails:
                print("111")
            time.sleep(60)
            latestmail = server.get_latest()
            newTime = (latestmail['date'] + datetime.timedelta(seconds=1)).strftime('%Y-%m-%d %H:%M:%S')
        time.sleep(300)
    except:
        time.sleep(600)

i don't know why happened "CRITICAL:zmail:<POPServer username:xxx@sina.com password:xxx pop.sina.com:995 ssl:True tls:False> duplicate login!"

zhangyunhao116 commented 4 years ago

looks like this problem could be fixed in 0.2.8, please have a try.

yonkylin commented 4 years ago

用了0.2.8的了,每15分钟收取一次,但是运行一天多就会出现上面这个错误

yonkylin commented 4 years ago

我用的是新浪邮箱,每隔15分钟收取一次,但是程序运行一两天就会报duplicate login!这个错误!按理说定时收取这个场景应该挺常见的,不知其他人有没有遇到过?有没有什么办法解决呢?

wsgfz commented 3 years ago

+1 每分钟取一次

现在也会出这个 [POPServer username:xxx password:xxx pop.exmail.qq.com:995 ssl:True tls:False duplicate login!]

thinkpadlx commented 3 years ago

这个收取邮件时,会频繁登录,比如 get_latest,收一个邮件就要登录退出三次,希望能改成持续连接,不必每次都登录退出