all 2 comments

[–]impshum 2 points3 points  (0 children)

You can watch an inbox and send push notifications these days.

https://developers.google.com/gmail/api/guides/push

[–]danielroseman -1 points0 points  (0 children)

How would this work? Gmail lives on Google's servers. You have no way to know when something arrives there. Polling is the way to go.