mozilla-b2g/gaia — pull request #10092 by guilherme-pg (2013-05-29 20:26:18+00:00)
Title: Implement support for push notifications in the email app

These patches make the email app contact a push-imap proxy (https://wiki.mozilla.org/Mobile/Projects/PushImapProxy) to get push notifications for incoming emails. They may still contain some rough edges, so any feedback would be greatly appreciated.

My approach was to set up the endpoints for the mail proxy when an account is
created, and have the account persist its endpoints. Whenever a push notification arrives,
we iterate through the available accounts to find out which one owns the endpoint and issue
a notification.