Case study · Line 02 · Mail
MailZ
Set up after Notion Mail shut down: a self-hosted mail client for all my Gmail accounts, with the best of its sorting and a real calendar next to the mail.
My role
Product Owner and first user. I scoped the need, analyzed three reference products, split the work into batches and validated each delivery in daily use.

2 days
to deliver the first eight batches
3
reference products analyzed
15
items ranked in the roadmap
0
line of code reused from another mail client
01 · The problem
When Notion Mail stops
Notion stopped Notion Mail, and my email sorting stopped with it.
I sorted several Gmail accounts there: labels described in a sentence and applied by AI, views that split the inbox. Rather than go back to a raw Gmail inbox, I set up MailZ.
The goal: keep what worked, run it on my own server, and stop depending on another team's roadmap. With a calendar next to the mail, as pleasant on iPhone as on a computer.
02 · Discovery
Analyze before building
Before writing the first line of code, I mapped what three reference products do. Each feature is rated present, partial or missing, with its source.
Reference 1
Notion Mail
The desktop app, analyzed directly: a thin shell, with most of the work in the web app. I separated what is observed from what is only inferred.
Reference 2
Notion Calendar
Shortcuts, views and overlapping events: the level to reach for the calendar part.
Reference 3
plMail
An open-source self-hosted client under the AGPL license. Only its feature ideas were kept: no code and no text.
The good ideas taken from Notion Mail
Notion Mail was shut down: that is what decided me to build MailZ. I took back the ideas that worked, rewritten from scratch.
- Smart labels: a label described in one sentence, which AI applies to new emails
- Views: inbox tabs defined by a simple query
- The block editor and its “/” menu
- The ⌘K palette and keyboard shortcuts
- Quick actions on hover: archive, snooze, mark as read
- A short message with “Undo” after each action
- Several drafts open at once, collapsed into bubbles
- MailZ as the default mail app, with the unread dot
Guiding principle
My data on my own machine, and AI only if I decide so. AI is optional and can run locally with Ollama: nothing leaves the server then. With a remote AI, only the subject, sender and snippet are sent, and this is stated in black and white.
03 · What's delivered
A complete mail client, live
MailZ replaces Gmail day to day, on computer and on iPhone. The screenshots come from a demo instance: accounts, emails and events are fictitious.



Public mock-up: write the email with blocks (“/” menu, colors, tables…), and the “as received” rendering appears below. No email is sent and no link is possible.
Sorting
- Smart labels described in one sentence, applied by AI
- Tree-based rules, reviewed in French before being saved
- Inbox tabs defined by a simple query
- “Why this sorting?” on each conversation
- In preparation: an automatic AI mail sorting engine
Writing
- Notion-style block editor, “/” menu and tables
- Formatting kept in Gmail, Apple Mail and Outlook
- Synced drafts, scheduled sending, undo send
- Toolbar above the keyboard on mobile
Daily use
- Multi-account Google Calendar, next to the mail
- Merged contacts and recipient autocomplete
- Push notifications, even with the app closed, iPhone included
- ⌘K palette and keyboard shortcuts
04 · How I ran it
Short batches, validated in use
Each batch starts from a gap felt while using the app, and ends with an update to the coverage table.
October 24
The foundation
Multi-account Gmail mail and calendar, self-hosted, deployable as a single container.
October 24
Reliable sending
A draft is never lost, an error stays readable, and sending resumes on its own when Gmail rate-limits.
October 25
The app on iPhone
Installable on the home screen, Location field with Meet and Maps, new calendar views.
October 25
Rewriting the editor
The first editor did not behave like Notion. Rather than patch it, it was rewritten on a real block model, covered by tests.
October 25
Contacts and notifications
Address book on the server, read-only Google contacts, push notifications and security updates.
October 31
Daily annoyances under review
Thirteen daily requests (Notion page, collected on October 31) are under review: sorting into folders and subfolders, settings in sections, configurable swipe, mobile navigation, attachments, navigation bars, editor, dates in French, free slots.
05 · Trade-offs
The decisions that shape the product
Six choices that say what MailZ is, and what it is not yet.
Gmail first, Microsoft later
A single provider to start, but covered in depth: labels, drafts, contacts and Google Calendar. Microsoft accounts are coming soon.
Trade-off: depth before breadth.
Check the inbox every 30 seconds
Real time requires an extra Google Cloud setup. Regular polling is enough to start, and real time is at the top of the roadmap.
Trade-off: ship now, optimize later.
Ideas yes, code no
plMail is under the AGPL license: reusing its code would have imposed its license on MailZ. Only the feature ideas were kept, and this is documented.
Trade-off: more work, no legal risk.
Google Contacts read-only
MailZ reads Google contacts but never writes to Google. The address book lives on the server, exportable as vCard or CSV.
Trade-off: less syncing, more peace of mind.
A mail that displays the same everywhere
The editor's formatting is converted into inline styles at send time, with an “as received” preview.
Trade-off: one extra processing step at send time, for reliable rendering on the recipient's side.
Security by default
Remote images blocked, emails shown in a frame without scripts, Google tokens encrypted on the server.
Trade-off: one more click to display a mail's images.
06 · Roadmap
Where MailZ is going
Items are ranked by interest and by cost. Two priorities at the top: AI mail sorting and Microsoft accounts. Since October 31, thirteen daily requests noted in Notion are under review.
Now
Sorting and real time
- An AI mail sorting engine that tidies the inbox on its own
- Gmail in real time, without waiting for the next poll
- The mail agenda over several weeks
- A signature per account and templates with variables
- A folder per mailbox, with its subfolders in smart labels
Next
Beyond Gmail
- Microsoft accounts (Outlook), coming soon
- A “new” marker distinct from unread
- Autocomplete in search
- Cards pulled from emails: parcels, tickets, codes, invoices
- Bulk download of attachments, with a preview in a tab
Later
Open and secure
- Reported sorting errors fed back into the AI
- A public appointment booking page
- Two-factor authentication for the instance
- Reply directly from a notification
07 · What I take away
Three Product Owner lessons
01
Benchmarking saves time
Knowing exactly what the references do avoids reinventing behaviors users already know.
02
Rewrite at the right time
When the editor did not keep its promises, starting over on a solid model was worth more than piling up patches.
03
Being its own first user
Using MailZ every day makes every annoyance visible straight away. The downside: you have to force yourself to keep a written roadmap.
08 · Languages and tech
What runs MailZ
Languages
TypeScript
CSS
HTML
Interface
React
Vite
PWA
Web Push
Server and data
Node.js
Fastify
SQLite
Zod
Docker
Services
Gmail API
Google Calendar
Google Contacts
AI: Claude, OpenAI or Ollama
OpenStreetMap
What's next
A private instance, for now
MailZ runs for me, on my server, and its code is not public yet. The rest of the workshop is over here.