README

EmailHandler

A free desktop app that cleans up your mailbox with AI.

macOS · Windows · Linux · Gmail + Outlook · English + Italiano

EmailHandler: clean your inbox, make it a game

What it does

Tags every emailJev (TypeSafe's decision model) sorts each email into one of 11 colored tags (Billing, Orders, Newsletters, Promotions, Social, Work, Personal, Travel, Security, Spam, Other), in your language.
Finds what mattersAn Important tag for receipts, contracts, prescriptions and real conversations. It sits next to the normal tag.
Finds what's safe to deletePromotions, expired alerts, old delivery updates. Old emails (6 months or older) get an "importance today" score from 0 to 4, so you can clear years of clutter, tagged or not.
Unsubscribes in bulkOne-click (RFC 8058) when the sender supports it, an email when it doesn't, a link as the last resort. Never for spam.
Cleans up by senderTag or trash everything from one sender in a period, with the exact count shown first.
Empties the TrashOne click, permanent, with a confirmation.
Several accountsGmail and Outlook side by side, one Jev key for all of them.

Nothing happens on its own. Every action needs your click and shows the exact number of emails first. Starred (Gmail) and flagged (Outlook) emails are never touched. Deleting goes to Trash first (30 days), unless you empty it.

Private by design

There is no EmailHandler server. Everything runs on your computer:

Sign in

Click Sign in with Google or Sign in with Microsoft. Your browser opens the provider's usual sign-in page; approve access and you're back in the app. That's it: no setup, no codes to copy.

ProviderWorks with
GoogleGmail, Google Workspace
MicrosoftOutlook.com, Hotmail, Live, MSN, Microsoft 365

During the beta, Google only lets invited testers sign in, and shows "Google hasn't verified this app": click Advanced → Go to EmailHandler. Microsoft may label the app "unverified". Both go away once the app is verified.

Develop

Requires Node 24 (nvm use).

npm install
npm start          # Angular dev server on :4300 + Electron window
npm test           # unit tests (SSRF guard, OAuth/PKCE, accounts, Graph mapping, unsubscribe)
npm run test:it    # Outlook integration test inside Electron (fake Microsoft Graph)
npm run typecheck  # UI (templates included) + Electron
npm run app        # build, then run the built app
npm run brand      # re-render icon, og-image and GitHub social preview from build/*.svg|html

The technical documentation, with what every file and function does, is in docs/TECHNICAL.md (in the source code).

Client IDs (developers only)

Sign-in needs one free client ID per provider. It identifies the app, not the user, and is built into the app, so users never see it.

  1. Create them once: step-by-step guide (in Italian) in docs/guida-client-id.html (in the source code).
  2. Put them in oauth.config.json at the repo root, following oauth.config.example.json. The file is gitignored and bundled into every build.
  3. For development you can use EH_GOOGLE_CLIENT_ID, EH_GOOGLE_CLIENT_SECRET and EH_MICROSOFT_CLIENT_ID instead.

A build without a client ID shows that provider's button greyed out ("Sign-in isn't available in this build").

Build installers (free, unsigned)

npm run dist:mac     # .dmg + .zip (arm64, x64), ad-hoc signed
npm run dist:win     # NSIS installer (x64, arm64), unsigned
npm run dist:linux   # AppImage + .deb (x64, arm64)
npm run pack         # unpacked app for the current OS, for testing

Output goes to release/. Building each OS on its own machine works best, for example on free GitHub Actions runners.

Since there is no paid code-signing certificate, the first launch needs one extra step:

Layout

electron/   main process: frameless window, app:// protocol + CSP, IPC,
            sign-in (Google + Microsoft), Gmail + Microsoft Graph, Jev,
            one-click unsubscribe (SSRF guard), encrypted secrets
src/        Angular UI (setup + app), EN/IT; talks to electron/ only via window.emailHandler
build/      icon, share image, macOS entitlements
tools/      brand image renderer
docs/       technical documentation + client ID guide
landing/    archived web landing page (not built)