How to receive push notifications from my Gmail account?

前端 未结 3 747
长情又很酷
长情又很酷 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:12

    The most universal "API" for monitoring a Gmail or Google Apps inbox is the IMAP protocol. There's some information about this here: Gmail IMAP OAuth for desktop clients

    For Google Apps inboxes (not general consumer Gmail accounts), you can also use the Gmail Inbox Feed, which provides an AtomPub XML feed of unread messages in a Google Apps inbox: http://code.google.com/apis/gmail/docs/inbox_feed.html

提交回复
热议问题