# Run in the tray and notify about new mail · michael/spark-rs

[View on GitCafe](https://git.cafe/michael/spark-rs/commit/825ef3083dfda8f97422e6fc5bbb024665011d26)

Repository: [michael/spark-rs](https://git.cafe/michael/spark-rs)

Visibility: public

Requested revision: 825ef3083dfda8f97422e6fc5bbb024665011d26

Requested commit: 825ef3083dfda8f97422e6fc5bbb024665011d26

Commit: 825ef3083dfda8f97422e6fc5bbb024665011d26

Tree: 8ba90eafc2c8ecc4b1eb4560bd6d4d409e6ceaff

Author: Michael Rodriguez

Committer: Michael Rodriguez

## Message

```
Run in the tray and notify about new mail

Closing the window now leaves spark-rs in the notification area, still
syncing; clicking the icon brings it back, and its menu checks for mail
or quits. Starting spark-rs again brings the running window forward
instead of starting a second sync (tauri-plugin-single-instance).

New mail shows a Windows notification with the New Mail sound, and
clicking one opens the message. The engine's sync report now names the
messages that arrived (Report::arrived), leaving out an account's first
sync. By default only mail from people notifies; mail already read, new
senders waiting in the Gatekeeper, and mail arriving while the window is
in front stay quiet, and more than three at once become one notification.
The app registers its name and icon under
HKCU\Software\Classes\AppUserModelId so notifications show without an
installer.

Settings -> Notifications chooses Smart, All or Off, turns the sound
off, stops closing to the tray, and opens spark-rs in the background at
sign-in (an HKCU Run entry with --background). The window now starts
hidden; setup shows it unless launched that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [66fb996b65459a06d3638a80011d67c999997870](https://git.cafe/michael/spark-rs/commit/66fb996b65459a06d3638a80011d67c999997870?format=markdown)

[Source at this commit](https://git.cafe/michael/spark-rs/tree/825ef3083dfda8f97422e6fc5bbb024665011d26?format=markdown)
