How to receive push notifications from my Gmail account?

前端 未结 3 803
长情又很酷
长情又很酷 2021-02-20 11:37

I\'d like to write an application which monitors a mailbox (ideally a Gmail mailbox). In brief, my question is how do I listen to incoming emails? I could always keep pulling em

3条回答
  •  天涯浪人
    2021-02-20 12:22

    The "API" to GMail is IMAP.

    In IMAP the IDLE feature is used to tell the server to notify the client when there are changes to the mailbox.

    IDLE is defined in RFC 2177 IDLE is an optional IMAP feature so this may or may not work on other IMAP servers.

提交回复
热议问题