New mail without reloading, and new versions
Webmail shows new mail the moment it arrives, and every Zappocity page tells you when a new version has been installed.
New mail appears by itself
While webmail is open it keeps a connection to the server and hears about every change to your mailbox: new mail, and messages read, moved or deleted in another tab, on your phone or in a mail app. The folder list, the unread counts and the open folder update within a few seconds. You never need to reload the page to see new mail.
If the connection drops (a laptop waking from sleep, a flaky network, the server restarting), webmail checks for mail every 30 seconds until it can reconnect, then catches up on anything it missed. It tries again after a couple of seconds at first and waits longer each time, up to a minute.
The browser tab shows your inbox's unread count, for example (3) Mailocity webmail, so you can see new mail from another tab.
Desktop notifications
Webmail can show a notification with the sender and subject when new mail arrives in your inbox while webmail is open in a background tab.
- Open Settings (the gear at the top).
- Under Desktop notifications, choose Turn on.
- Allow notifications when your browser asks.
The setting is kept in this browser only: turn it on separately on each computer. Notifications only appear while a webmail tab is open; they are not sent when the browser is closed. Because the sender and subject show on your screen, leave this off on a shared computer.
If your browser says notifications are blocked, allow them for this site in the browser's site settings, then come back to Settings. Turn off stops them at once.
"A new version is available"
When Zappocity is upgraded while you have webmail, the admin panel, the domain admin panel, your account page or the signup page open, a bar at the bottom of the page says so. Pages check every 2 minutes, when you come back to the tab or window, when the network returns, and when webmail reconnects.
The bar appears only when something your browser loads has changed (the pages, their scripts or styles). An upgrade that changes only the server needs no reload, so it shows no bar. The homepages do not check.
- Reload loads the new version. If you are writing a message, webmail first offers to save it as a draft; if saving fails, the page stays as it is so nothing is lost.
- The cross hides the bar; it comes back only for a later version.
Pages never reload by themselves, so an unsent message is never lost.
For developers
- Webmail reads the standard JMAP event stream,
GET /jmap/eventsource?types=*&closeafter=no&ping=60, withfetch()rather thanEventSource, because requests made with the webmail session cookie must carry theX-CSRF-Tokenheader. Eachstateevent triggers a refresh; a stream silent for 150 seconds (two missed pings) is reopened. The stream ends when the session does (sign-out, a new password, a suspension), and a401sends webmail back to the sign-in page. - The server pushes changes within about 2 seconds. Over HTTP/2 the stream shares the page's connection.
GET /api/versionreturns{"version": "..."}, the same build version as theapp-versionmeta tag and the?v=on asset links. See How the web pages load.