Elma is a Ratatui-based terminal mail user agent. It focuses on keyboard-driven navigation and efficiency, inspired by tools like Mutt, Pine, and Elm, while offering a modern feature set out-of-the-box, including:
- Crisp HTML email rendering,
- Server-side search, spam handling, and draft management,
- Support for special-use mailboxes and labels, like starring and marking as important,
- Multiple account support,
- Scheduled message actions (archive/delete),
- Extensibility for additional backends.
Elma strives to provide a productive and enjoyable email experience directly from the terminal while staying compatible with the established workflows of current web-based email services.
A “mock” backend is available via --demo for you to try out Elma without
setting up an email account:
cargo run -- --demoWithout that flag the application loads accounts from ~/.elmarc. Multiple
accounts are supported via the [[accounts]] table:
[[accounts]]
name = "Private"
backend = "gmail"
username = "[email protected]"
password = "app-specific-password"
[[accounts]]
name = "Demo"
backend = "demo"Supported backends are:
gmail: Connects to Gmail via IMAP and SMTP.jmap: Connects to any JMAP-compatible server (e.g., Fastmail).demo: A mock backend that generates fake messages for demonstration purposes.
If no configuration is found the client falls back to the mock backend so you can continue exploring the UI without network access. New mock messages arrive every few seconds to keep the inbox active.
Elma presents a terminal-based email client interface with a focus on keyboard navigation and efficiency. The main screen displays a list of emails in the selected mailbox, along with key information such as sender, subject, and date. Users can navigate through emails, open them for reading, and perform various actions like archiving, deleting, or starring messages.
Elma differentiates between two different types of actions on messages:
-
Immediate actions: These simple actions are applied to the message right away. For example, starring or unstarring a message is an immediate action. Actions like these can usually easily be undone by performing the opposite action (e.g., unstarring a starred message) if you notice a mistake.
-
Scheduled actions: These actions are marked for later application. For example, when you delete a message, it is marked for deletion but not removed from the list until you commit all the scheduled changes (by pressing
$). This allows you to quickly go through a large amount of messages and review and modify your scheduled actions before they are finalized.Scheduled actions (
d,y,!) are idempotent: pressing the same key on a message that is already scheduled for that action is a no-op — it keeps the action and advances to the next message. This means you can sweep through a list pressingdrepeatedly without accidentally undeleting a message you marked earlier. To undo a scheduled action, pressu— this removes the pending action, restores the message's original status, and advances to the next message.
Message status is indicated by a four symbol character prefix in the message list:
- Read/unread/scheduled action status:
: This is a read messageN: New/unread messageD: Scheduled for deletionA: Scheduled for archival!: Scheduled to move to spamI: Scheduled to move to inbox
- Starred/unstarred and important status:
: Regular message*: Starred○: Marked as important (ASCII mode:+)⊛: Marked as important and starred (ASCII mode:#)
- Reply/forward state:
: No reply/forward↩: This message has been replied to (ASCII mode:r)→: This message has been forwarded (ASCII mode:f)⇄: This message has been both replied to and forwarded (ASCII mode:x)
- Attachment indicator: (TODO)
: No attachment@: Message has one or more attachments
Ctrl+Qquits to the shell.Enter/Rightopens the selected message;Esc/Leftcloses the viewer.d,Delete, orBackspaceschedule the message for deletion.yschedules the message for archival.!schedules the message to move to spam.uunschedules a pending action (delete/archive/spam/move-to-inbox), or toggles unread/read state on normal messages.stoggles the star flag.$commits scheduled actions (removing archived/deleted messages from the list).- Arrow keys,
PageUp/PageDown,Home,Endmove the cursor in the inbox. - While a message is open,
j/kjump to the next/previous message and.toggles raw HTML. ggo to mailbox:iInboxaArchivesStarredIImportantdDraftstSentSSpam (Should bejor even!?)TTrash (Should begror eveng#?)
When viewing a special mailbox (Archive, Spam, Trash), the primary action key for that mailbox is flipped: d in Trash, y in Archive, and ! in Spam each schedule a move back to inbox instead. Pressing u then unstages that move, keeping the message where it is.