Skip to content
hobleydPublic

About

An email client for Office 365, Google Workspaces, IMAP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

NightMail

nightmail-demo.mp4

NightMail is a desktop and mobile email client built with Flutter. It supports Microsoft 365, Google Workspace, Gmail, and any standard IMAP/SMTP account — all from a single unified interface. It will default to using my tenant, but you can specify your own. The ISO app works, but is in test using TestFlight currently. Gmail support requires config at my side until I submit to Google for verification.

The app provides a desktop based three-pane layout (folders, message list, reading pane) with integrated calendar, tasks, and contacts across all supported providers. On mobile, a suitable interface as expected.


Features

Email

  • Read, compose, reply, reply-all, and forward messages
  • Forward a multi-selection on the desktop as .eml attachments in one new message
  • Bcc recipients, behind an expander on the Cc row; a message can go to Cc or Bcc recipients alone, with no To
  • HTML and plain text rendering
  • Attachment download and upload
  • The compose paperclip is a menu: Attach from Computer, Attach from Cloud, or Link from Cloud — browse OneDrive/SharePoint, a NightMail Server's files or Google Drive (folders, search, several files at once); attached Google Docs, Sheets and Slides go as Office files
  • A message linking a cloud file checks at Send that every recipient can open it, and offers to share it with those who can't (view-only) or send anyway
  • Move messages between folders
  • Mark as read/unread
  • Report junk/spam
  • Report phishing, from the junk dropdown or the reading pane: Microsoft 365 submits it to the tenant's threat submissions (admin consent asked once); Gmail and IMAP file it as junk; with a Phishing Inbox set, every provider mails the report there instead
  • Full-text search within folders
  • Search operators on every provider: free text matches message bodies as well as headers, plus from:, to:, cc:, subject:, body:, has:attachment and "quoted phrases"
  • An AI assistant's email search shows in the message list from its result card ("Show N emails in list"), under a banner that closes back to the folder
  • When the AI assistant narrows a search down to the emails that answer the question, just those emails can be shown in the message list too
  • The AI assistant knows which email is open, and can judge whether it is phishing or malicious from its SPF/DKIM/DMARC results, Reply-To, lookalike senders, mismatched links and risky attachments
  • AI writing assistant in the compose window: a chat beside the message (the bottom half of the screen on a phone) that drafts, reviews and revises only what you wrote above the quoted reply, leaving the signature alone; proposed versions apply with one click and undo just as easily
  • Sender anomaly and spam detection
  • Spam filter synced across IMAP clients via a dedicated server-side folder
  • Delete a conversation thread's in-folder messages from the reading pane
  • Turn an email into a meeting from the reading pane: the sender and recipients become the guests, the latest message (without the quoted history) the notes, and the subject the title
  • Double-click an image in a message to open it in a resizable window
  • Spell-checking with inline suggestions in the compose editor (macOS, Windows, Linux)
  • Compose editor: font-family dropdown, custom font-colour palette, and pasting/resizing images inline
  • Keyboard shortcuts for bold, italic, underline, strikethrough, lists, indent and link in the compose editor, under Cmd on macOS and Ctrl elsewhere; Tab and Shift+Tab nest and un-nest a list item
  • Markdown-style formatting as you type in the compose editor: "- " starts a bullet list and "1. " a numbered one, and a word wrapped in asterisks, underscores or tildes becomes bold, italic or struck through when the closing marker is typed, with one undo giving back the literal text
  • Select and copy message text (subject, sender, recipients, date, body) with standard platform shortcuts (Cmd/Ctrl+C)
  • URLs typed as plain text in a message become clickable links, with a hover preview and a copy-link button
  • The sender's address is clickable to compose a reply, with a copy button on hover
  • A thread's collapsed row shows the newest message from someone else, not just the newest overall
  • The provider's own flag (Graph flag, Gmail star, IMAP \Flagged) shown as a read-only icon on the message list
  • mailto: links open the compose window instead of the OS's default mail client
  • SharePoint, OneDrive and Google Drive document links open as a preview in the reading pane, like an attachment — from any mailbox, whichever account holds the file (file access is asked for once, the first time you open one)
  • A previewed SharePoint, OneDrive or Google Drive document keeps a link to the file itself — tap the preview bar's title or the open-in-new icon to open it in the browser
  • Nextcloud share links (/s/…, /f/…) on a NightMail Server's advertised file sites open as a preview in the reading pane, like a SharePoint link; a password-protected or unshared link opens in the browser instead
  • An email attached to another message opens as a preview in the reading pane, with its own attachments available to open or save
  • A markdown attachment or a .md document link renders as formatted text in the reading pane's preview, rather than showing its raw source
  • Word, Excel and PowerPoint attachments preview in the reading pane; with the ArtCraft wordcraft-cli / deckcraft-cli installed, Word and PowerPoint render as a full-fidelity PDF in a fraction of a second, falling back to LibreOffice and then a built-in viewer
  • The compose window reopens at the size and position it was last closed at
  • New-mail notifications on iOS/macOS carry Mark Read, Delete, and Dismiss actions that act without opening the app, and appear on a paired Apple Watch automatically
  • Cmd/Ctrl+A selects every message in the folder list, so delete, junk and drag act on the whole folder
  • Keyboard selection in the message list: Shift+Up/Down extends a range, Cmd/Ctrl+Up/Down moves without selecting and Space picks the row, Escape clears; the list scrolls to follow
  • In Sent, Drafts and Outbox a row leads with who the message went to ("To: Ann, Bob…") instead of your own name

Folders

  • Full folder hierarchy with unread counts
  • Create folders via right-click context menu
  • A new folder appears the moment the provider accepts it, and a create that fails or is attempted offline keeps the typed name on screen with the reason and a retry
  • Delete a folder, and the folders inside it, from the right-click context menu
  • Empty folder (with permanent delete option), on every provider — emptying a Gmail trash asks Google for permission to delete mail the first time
  • Incremental sync with delta tokens (Microsoft 365)
  • Incremental sync for Gmail (history API) and IMAP (UID-based) accounts too
  • A folder you have scrolled stays cached: reopening it or refreshing shows everything already fetched, and Load More reads the cache before going to the server (Microsoft 365, Gmail)
  • Settings > General > Keep opened folders offline downloads every message in the folders you open in the background, so they scroll to the end without waiting, and rechecks each one monthly for mail removed elsewhere
  • Drag folders in the list to reparent them: drop onto a folder to nest inside it, or on the line under a folder to make it a sibling, including at the top level
  • Dragging an email near the top/bottom edge of the folder list auto-scrolls it, and dwelling over a collapsed folder auto-expands it as a drop target

Calendar

  • View, create, update, and delete events
  • Accept, tentatively accept, or decline meeting invitations
  • Check attendee availability, with a side-by-side schedule pane for finding a free slot (see below)
  • Propose new meeting times from the full event form, with the guests' availability shown while you pick the slot; accept a proposed time as the organizer (moves the meeting and re-invites attendees)
  • New meetings default to a 15-minute reminder
  • One meeting-reminders dialog lists every upcoming meeting and counts each down (15, 10, 5 minutes, starting now), with per-meeting dismiss; toggle under Settings > Appearance > Show Meeting Reminders
  • Recurring event support, with per-occurrence or whole-series edit and cancel
  • Editing a meeting you organize notifies attendees of the change
  • Inline Join button on a meeting tile from 3 minutes before it starts until it ends, for meetings with a video-call link
  • The meeting-reminders dialog's "Starting now" row has a Join button for meetings with a video-call link: it joins the meeting and closes the dialog
  • Teams meeting links open straight in the Teams app rather than via a browser tab, falling back to the web link when Teams isn't installed
  • Guest RSVP status (accepted / declined / tentative) shown on each guest chip
  • Right-click a guest chip to copy their email address, including on meetings you didn't organise
  • Email Attendees from a meeting's right-click menu opens a new email to the organiser and every guest, titled after the meeting
  • Calendar window cycles Working Week → Full Week → Month; the month view shows each day's share of 9am–5pm already committed to meetings
  • Answering an invitation deletes the older invitation emails for that meeting it supersedes
  • Timezone-aware scheduling
  • Google Meet toggle for Gmail meetings
  • Book meeting rooms directly from the event's Location field — booking invites the room as a resource, and only the invitation reserves it
  • Hover a meeting tile to preview its full details without opening it
  • Calendar opens to the working week by default, with hour gutters on both edges
  • Meetings load instantly from a local cache while the calendar syncs in the background
  • Supported backends: Microsoft Graph, Google Calendar, Nextcloud CalDAV, macOS/iOS EventKit
  • Forwarded event invitations (calendar publishes, booking confirmations, tickets) are recognised, with an Add to calendar action
  • The meeting invite/event-edit window reopens at the size and position it was last closed at
  • Forward a meeting you were invited to on to someone else — joins the organiser's meeting where the provider supports it (Microsoft 365, and Google when the organiser allows guests to invite others), otherwise falls back to emailing the invitation

Meeting colours are driven by your relationship to each meeting (your participation), mapped to a single shared scheme so Gmail and Microsoft 365 events are coloured consistently — the same situation gets the same colour on every account, regardless of the provider-specific fields underneath:

Your participation Colour
Organiser (your own meeting) 🟢 Green
Accepted someone else's 🔵 Blue
Tentative / not yet responded 🟡 Yellow
Declined ⚪ Grey
On your calendar (no response signal) 🔵 Blue
Out-of-office (Microsoft 365 only) 🔴 Red
Working elsewhere (Microsoft 365 only) ⚪ Grey

Out-of-office and working-elsewhere are free/busy states with no participation equivalent, so they override the scheme; Gmail's event feed doesn't report them, so they appear on Microsoft 365 only.

Finding a free slot. Add guests to a meeting and a Find a time link appears under the Guests field, opening a schedule pane beside the form. It shows 07:00–20:00 of the meeting's day with every participant's busy blocks side by side; click a slot to move the meeting there. It's always available once there's at least one guest — you don't have to hit a clash first — and each guest also gets a one-line free/busy summary for the meeting's own time.

What the pane can show depends on the provider:

Backend Free/busy detail
Microsoft 365 Busy / tentative / out-of-office / working elsewhere, with meeting titles where shared
Google Calendar Busy intervals only — no titles, no tentative/OOF distinction (a freeBusy API limitation)
Nextcloud CalDAV None; CalDAV free/busy needs the RFC 6638 scheduling extensions, which aren't universally supported

Guests whose free/busy isn't visible are left out of the summary rather than being reported as free — a blank row means "not known", not "available".

Google Calendar free/busy needs the calendar.freebusy OAuth scope. Gmail accounts added before that scope was requested keep a token without it and show no availability until they're signed in again — use Sign In Again under Settings → Accounts.

Tasks

  • Create and manage tasks across Microsoft To Do and Google Tasks
  • Set due dates, importance, and status
  • Notified when a task falls due, even if NightMail was closed at the time
  • Tasks pane sorted by due date, earliest first, with undated tasks at the bottom
  • Flag context menu offers business-day-aware due dates: Tomorrow, 3 Days, This Week and Next Week (resolving to the coming or following Friday)
  • Attach emails to tasks (or link the source email in notes for providers without an attachment API)
  • Expandable task notes with a link back to the source email — opens the email's conversation thread in the list pane
  • Red dot on the Tasks icon when the active account has an overdue task
  • A message list row's flag is coloured when its thread has an open task, and turns red once the task is overdue

Commitments

  • Commitments pane beside Calendar, Tasks and AI: mail, calendar and tasks read as one stream of obligations
  • Today view of the day's meetings, the tasks falling due, and every commitment due or overdue
  • The meeting in progress, or the next to start when none is, is highlighted in Today
  • The tasks-due row in Today expands in place to list the tasks themselves, in the pane and the detached window alike
  • You owe: promises detected in your sent mail ("I'll send it Friday"), most urgent first
  • Waiting on: what you asked others for, or they promised you, with how long it has been outstanding
  • Needs a decision: received mail that still wants an action or reply, against the count of mail that needs none
  • A reply from the other side closes a "waiting on" by itself and your own reply closes a "needs a decision"; a promise you made only closes when you mark it done
  • Detection runs through a System One typed-decision model routed under Settings › AI › Triage: TypeSafe Jev in the cloud, or the open Laya model entirely on-device through Apple MLX behind a local Jev-compatible bridge, so with a local model nothing leaves the machine
  • Each message is read by the model once; new mail is checked after every poll cycle
  • Double-click the Commitments button to open it in its own screen-sized window, where the four sections become a side-by-side board of cards, each with the excerpt of what was said; a card opens its message in an email window
  • Schedule time for a commitment: a block is proposed on the lightest working day in its horizon at the first free slot, movable before booking — a day list with load bars in the pane, a week grid with meetings drawn to scale in the window — then booked as a real calendar event; scheduling again moves the same event
  • Each commitment carries the model's effort estimate (a quick reply up to half a day), shown on its row and used to size its proposed block, its share of the week-ahead load and the assistant's defaults instead of a flat hour; the scan status line names the model that answered
  • Track a message by hand from the reading pane when the model missed it: pick "needs my action" / "waiting on them" / "I owe them" and a due reading, and it joins the ledger at once, reopening the row if it had been closed
  • Week-ahead forecast ("Future Me"): each coming day's meetings, blocked time, commitments and tasks landing, with overloaded days flagged and a Rebalance plan that moves the least urgent items to lighter days their deadline allows
  • A gap a cancelled meeting leaves in today is flagged as just freed, paired with the most pressing unscheduled commitment, and filled with one click
  • Natural-language control: tell the assistant what to change ("Move everything non-urgent to Friday and give me 2 hours for the AWS work") and it books, moves and closes through the same actions, showing each step and reporting what changed

Chat

  • Chat pane beside Calendar and Tasks: chat with the selected email's sender, or pick anyone else on the email from a dropdown — only people in your organisation are offered
  • Microsoft Teams chats and channels on Microsoft 365 and NightMail Server, and Google Chat direct messages, group chats and spaces on Google Workspace accounts
  • Double-click the Chat button for a chat window: chats, spaces and Teams channels sorted by latest activity, message history with threads and replies, and search across old messages
  • A one-on-one is only created when you send the first message
  • People outside your organisation are offered too when you already have a one-on-one chat with them
  • Pictures show in the conversation (Teams pasted images, GIFs and stickers; Google Chat uploads) and open full size on click
  • Each sender has an avatar (directory photo, or initials) and their own pastel colour — yours is always blue, so who is talking stands out at a glance
  • A red dot on the Chat button when someone has written in a chat you haven't read; opening the chat marks it read in Teams or Google Chat too
  • Slack: connect one or more workspaces under Settings > General — direct messages, group messages and channels with threads, search, pictures and avatars, in the same pane and window
  • With Slack beside your account's own chat, the Chat pane's header switches between chat systems, each with its own unread dot and count, and the Chat button's tooltip says where the unread chats are; an IMAP account with Slack opens Slack directly
  • Chats open instantly from an encrypted local cache, then fetch only what changed since (Teams, Slack and Google Chat)
  • Slack messages and reactions show every emoji, including the workspace's own custom emoji
  • The chat window bolds only chats with unread messages and sorts by most recent or by name
  • Chats, spaces and channels quiet for a week tuck away behind a "Show N older" row; unread ones always show
  • On a NightMail Server, the Chat button's unread dot appears within seconds of a new message, not at the next minute's check
  • The top of the Chat pane lists your unread chats and channels, newest first; click one to read it below
  • Drag the divider under the Chat pane's unread list to give it or the conversation more room; the split is remembered
  • Search from the Chat pane's dropdown to message anyone in your address book you can chat with, or any chat or channel, by name
  • Edit your own chat messages on Teams, NightMail Server, Google Chat and Slack
  • Open the chat window straight onto the conversation in the Chat pane
  • React to anyone's chat message with an emoji on Teams (chats and channels), NightMail Server, Google Chat and Slack, or tap an existing reaction to add yours
  • Tap a reaction you gave to take it off
  • Paste a picture into a chat message (Cmd/Ctrl+V) to send it on Teams, Google Chat and Slack
  • Rename group chats and channels on Teams, NightMail Server and Slack
  • Rename Slack group DMs as well as channels
  • Reply in a thread from Slack direct messages and group DMs, as in channels
  • Type @ in a chat message to tag someone in the conversation on Teams, NightMail Server, Google Chat and Slack
  • Find any chat or channel by name from the field under the Chat pane's unread list
  • Opening a channel from the unread list because of a thread reply opens that thread, with the new reply on screen
  • Click someone's avatar in a chat to call them: a Teams voice or video call on Microsoft 365, a Talk call that rings them on NightMail Server, a Slack huddle, or a Google Meet whose link is sent to them on Google Chat
  • Drop files on a chat conversation to send them straight away, one message each; a drop on an open thread replies in it
  • A chat you've just read stays in the Chat pane's unread list for 45 seconds, below the unread ones, so a quick follow-up is still one click away
  • New chat messages raise a notification (not for the chat already open in front of you), with a per-chat mute; on phones chat is checked in the background, as mail is
  • A video sent on Slack shows its preview frame with a play button; clicking it plays the video in Slack
  • Videos sent on Slack, Teams and Google Chat play inside NightMail; Slack and Google videos stream straight away on desktop, and Teams recordings stream from SharePoint/OneDrive without a download

Contacts

  • Typeahead in the compose window drawing from three sources:
    • Previously known senders (local database)
    • System contacts (macOS Contacts app)
    • Organisational directory (Microsoft People API / Google Directory)
  • Paste a list of names, one per line, into To or Cc and each is looked up in the directory and added as a recipient; names that aren't found are kept and flagged

Mobile

  • Touch-sized icons and back-button navigation between panels on Android and iOS
  • Opens on the Inbox of the last active account, with Calendar, Tasks and AI one tap away at the foot of the list
  • Message list and message are real screens: edge-swipe back on iOS, predictive back on Android
  • Pull to refresh, long-press to multi-select, swipe right to mark unread, swipe left for actions, long-press for context menus
  • A multi-selection can be forwarded as .eml attachments in one new message, or moved to a folder picked from the full folder tree
  • Appears in the Android and iOS share sheet: text, links, photos and files shared from another app open a new message with them filled in
  • Swipe left or right while reading a message to open the next or previous thread in the folder, with a matching slide transition
  • Calendar cycles Day → Week → Full Week → Month, with the same month view as the desktop
  • Swipe left or right on the calendar to step forward or back by a day, week or month
  • Swipe left or right on the mobile calendar to step to the next or previous period
  • iOS: system-style alerts and switches, links open in an in-app Safari view, dark and tinted app icons on iOS 18

Accounts

  • Multiple accounts from different providers simultaneously
  • Per-account folder, calendar, and task views
  • Profile fields (name, title, phone) are filled from the Microsoft or Google directory when an account is added, so signature merge tags start out populated
  • The signature in Settings → Accounts previews with its merge tags filled from your profile, and only becomes editable (with its formatting toolbar) when you press Edit
  • Import an HTML signature from a file (Settings → Accounts) — signature-generator exports and Outlook .htm signatures keep their merge tags and IFEXISTS(...) calls
  • Replies and reply-alls that include anyone on your own domain open without the signature (Settings → Hide signature on internal replies, on by default); personal Gmail and Outlook.com/Hotmail domains never count as internal
  • Separate Gmail and Google Workspace sign-ins — Workspace asks for the room-directory scope on the first sign-in, so room booking lists the whole tenant without a later Sign In Again
  • Secure token storage (system Keychain / encrypted preferences)
  • Clear an account's local cache without removing the account
  • Phishing Inbox (Settings → Accounts) sends Report phishing to an address you choose, such as your security team, with the original attached as an .eml; left empty, the provider's default is used
  • Sign In Again (Settings → Accounts) re-runs the OAuth consent flow for a Microsoft 365 or Gmail account without deleting it or its cache. Needed when a new provider scope is added — providers won't grant one on a token refresh, so existing accounts have to re-consent. Cancelling is safe: the current token is left in place until a new one is issued.
  • Add Shared Mailbox (Microsoft 365) adds a shared mailbox using the signed-in account's own permissions, with no separate sign-in
  • NightMail Server sign-in points a Microsoft Graph account at a self-hosted NightMail Server instead of Microsoft — enter the server address and NightMail reads its /.well-known/nightware discovery and signs in with the endpoints it publishes
  • A NightMail Server that publishes a change stream has new mail and calendar changes synced as soon as it signals them, rather than at the next poll
  • Migrate Account copies mail from one configured account into another, mapping special folders by kind rather than name; resumable, with a status dialog reporting live progress and any permanent per-message failures
  • Migrate Inbox (right-click the Inbox; not Google accounts) copies just that folder's messages into another account's Inbox, with the same resume and status reporting; mail it has copied is not copied again by a later Migrate Account
  • Both copy the account's rules too once the mail is across — only rules the new server can express exactly, with the rest listed and why — and then ask whether to turn off the old account's copies

Out of Office

  • Settings → Out of Office sets the mailbox's own automatic reply — a start date, an end date, and the message — for Microsoft 365 and Gmail accounts. It is a server setting, so it applies however you read your mail, not just in NightMail
  • Choose who gets a reply: everyone, your contacts, or nobody outside your organisation
  • Microsoft 365 accounts can send a different message to people outside the organisation
  • Saving asks the provider for one extra permission the first time; reading your current setting needs nothing new
  • Turning it on offers to clear your calendar for the dates you set: decline meetings you're attending and cancel ones you're organising (which emails attendees, so those are never pre-selected). Only offered for the account that's currently active elsewhere in the app

Rules

  • Settings → Rules creates, edits, reorders, switches off and deletes an account's mail rules: conditions (sender, recipients, subject, body, attachments, "sent to me"…), exceptions, and actions (move, copy, delete, mark read, flag, forward, stop processing more rules)
  • Microsoft 365 rules and Gmail filters are the mailbox's own, so they run on the server however you read your mail; a rule using settings NightMail can't show opens view-only rather than being rewritten without them
  • IMAP accounts get rules too, run by NightMail on new Inbox mail while it is open — never on mail already there, at most once per message, and never in a way that could loop (no copies into the Inbox, no forwarding of automatic mail)
  • A rule button on each message in the mail list starts a new rule from that message, with its sender already filled in as the condition
  • A new rule can also be run straight away on the folder the mail list is showing — moving, deleting or marking read the matching messages already loaded there (never forwarding old mail)
  • Any saved rule can be run on the current folder from Settings → Rules

Updates

  • Checks for a new version at launch and every 6 hours, with a dot on the Settings icon when one is waiting; nothing downloads or installs until you press the button
  • Opening Settings → About re-checks for a new version straight away
  • macOS and Windows download, verify and install the update in place, from a signed release archive
  • Android installs the newest release's APK through the system installer
  • Linux downloads the newest release's snap, checks it against the published checksum, and installs it over the running one (you'll be asked for your password), then relaunches
  • Release notes for every version published since the one you are running, grouped by change type, shown whether or not an update is pending

Supported Providers

Microsoft 365 / Office 365

NightMail connects to Microsoft 365 via the Microsoft Graph API using OAuth 2.0 with PKCE.

What you need:

  1. An Azure AD app registration in your tenant (or a shared multi-tenant registration).

  2. The following API Permissions granted (delegated):

    Permission Purpose
    User.Read Sign-in and profile
    Mail.Read Read messages
    Mail.ReadWrite Move, delete, flag messages
    Mail.Send Send messages
    MailboxSettings.Read Folder names and settings
    Calendars.ReadWrite Read and write calendar events
    Tasks.ReadWrite Read and write Microsoft To Do
    People.Read Organisation contact suggestions
    Files.Read.All Preview a linked SharePoint/OneDrive document (optional — asked for separately, the first time you open one)
    MailboxSettings.ReadWrite Set an out-of-office reply (optional — asked for separately, the first time you save one)
    offline_access Refresh tokens (required)
  3. A redirect URI configured for the platform:

    • macOS / iOS: nightmail://auth-callback (Mobile and Desktop platform type)
    • Windows / Linux: http://localhost:34571 (Mobile and Desktop platform type)
  4. An admin in the tenant must grant admin consent for People.Read and the mail/calendar scopes if your organisation requires it.

Your Azure Client ID (and optionally a custom tenant ID) can be entered directly in NightMail under Settings → Accounts when adding a Microsoft 365 account.

Personal Microsoft accounts (outlook.com, hotmail.com, live.com) can connect using the common endpoint — no Azure tenant required, but you still need an app registration with the above scopes and redirect URI.


Google Workspace / Gmail

NightMail connects to Google via the Gmail API, Google Calendar API, Google Tasks API, and Google People API using OAuth 2.0 with PKCE.

What you need:

  1. A project in Google Cloud Console with the following APIs enabled:

    • Gmail API
    • Google Calendar API
    • Google Tasks API
    • Google People API
    • Google Drive API (optional — only to preview a linked Drive document)
  2. Three OAuth 2.0 Client IDs in the same project, one per platform family — Google removed custom-scheme redirect support from Desktop-type clients in 2022, so a single client can no longer cover desktop and mobile:

    • Desktop application — covers macOS, Windows, Linux, and web.
    • iOS — Bundle ID au.com.sharpblue.nightmail. No redirect URI field to fill in.
    • Android — package name au.com.sharpblue.nightmail, plus the SHA-1 certificate fingerprint of your signing key (register a separate client per keystore — debug and release have different fingerprints). Enable custom URI scheme under this client's Advanced settings; Google disables it by default for new Android clients.
  3. The following OAuth scopes authorised:

    Scope Purpose
    gmail.modify Read, move, label, and send messages
    calendar.events Read and write calendar events
    calendar.calendarlist.readonly Resolve a calendar's default reminder minutes
    calendar.freebusy Attendee free/busy for the scheduling pane
    tasks Read and write Google Tasks
    contacts.readonly Personal contact suggestions
    directory.readonly Organisation directory suggestions
    drive.readonly Preview a linked Drive document (optional — asked for separately, the first time you open one)
    gmail.settings.basic Set an out-of-office reply (optional — asked for separately, the first time you save one)
    https://mail.google.com/ Permanently delete mail (optional — asked for separately, the first time you empty the trash)
  4. A redirect URI added to the Desktop client:

    • macOS / Windows / Linux: http://localhost (loopback) — macOS runs its own loopback listener rather than a bare custom scheme; see lib/infrastructure/auth/CLAUDE.md.

    iOS and Android don't take a registered redirect URI — Google validates by Bundle ID / package name instead. Both request au.com.sharpblue.nightmail:/google-auth-callback — a bare scheme like nightmail:// is rejected on either platform, verified directly against both OAuth clients, even with Android's custom-URI-scheme setting enabled (see below).

  5. For Google Workspace organisations, a Workspace admin may need to mark the app as trusted under Security → API Controls → App Access Control if the scopes require verification or if the app is not published to the Google Workspace Marketplace.

Note: directory.readonly requires a Google Workspace account (it is not available for personal Gmail accounts). Organisation contact suggestions will simply not appear for personal Gmail users.

Your Google Client ID can be entered in NightMail under Settings → Accounts when adding a Google / Gmail account.


IMAP / SMTP (Generic, including self-hosted)

NightMail supports any standard IMAP + SMTP email account. No app registration or cloud project is required.

What you need:

  • IMAP server hostname, port, and SSL setting (default: port 993, SSL enabled)
  • SMTP server hostname, port, and TLS setting (default: port 587, STARTTLS)
  • Your email address and an app-specific password

For providers that disable basic password authentication (most hosted services), generate an app password:

  • Gmail (personal): Google Account → Security → 2-Step Verification → App Passwords
  • Outlook.com / Hotmail: Microsoft Account → Security → Advanced Security → App Passwords
  • iCloud Mail: Apple ID → Sign-In & Security → App-Specific Passwords
  • Fastmail, ProtonMail Bridge, etc.: follow each provider's documentation

Optional: Nextcloud CalDAV

IMAP accounts can optionally link a Nextcloud calendar via CalDAV. Provide your Nextcloud server URL and credentials when adding the account.


Platform Support

Platform Email Calendar Tasks System Contacts
macOS ✓ ✓ ✓ ✓
iOS ✓ ✓ ✓ ✓
Android ✓ ✓ ✓ ✓
Windows ✓ ✓ ✓ —
Linux ✓ ✓ ✓ —

Building from Source

flutter pub get
flutter build macos --debug

Run flutter clean after any changes to entitlements or code-signing settings.

Linux: the compose editor's spell-checking relies on WebKitGTK's system spell-checker, which uses hunspell. Install hunspell and a dictionary for your locale (e.g. sudo apt install hunspell hunspell-en-au), otherwise misspelled words will not be underlined and no correction suggestions will appear.

See CLAUDE.md for architecture conventions, macOS code-signing requirements, and platform channel gotchas.

About

An email client for Office 365, Google Workspaces, IMAP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages