How do I enable push-notification for IMAP (Gmail) using Python imaplib?

后端 未结 4 1482
甜味超标
甜味超标 2021-01-30 11:35

Is there a way to monitor a gmail account using imaplib without polling gmail each time I want to see if there is new mail. Or in other words, I just want the script to be notif

4条回答
  •  梦毁少年i
    2021-01-30 11:58

    This link shows an example of using IMAP IDLE: http://blog.timstoop.nl/2009/03/11/python-imap-idle-with-imaplib2/

    It uses the same library linked to in casperOne's answer (imaplib2).

提交回复
热议问题