# nmail

> Terminal email client for Linux and macOS with an Alpine-like interface and built-in IMAP and SMTP.

nmail is an ncurses email client written in C++ that connects to one IMAP and SMTP account and keeps a local SQLite cache, optionally encrypted. It has setup wizards for Gmail, iCloud and Outlook (including OAuth 2.0), converts HTML mail to text, composes HTML mail from Markdown and can queue mail while offline. It suits users who want an Alpine-style client with no separate sync or send tools. Multiple accounts need separate nmail instances.

- Type: Email client
- Interface: Full-screen terminal interface
- Systems: Runs on Linux and macOS. Not available for Windows, BSD or Android.
- Language: C++
- License: MIT (MIT)
- Latest version: v5.16.4
- Maintained: yes
- Website: https://github.com/d99kris/nmail
- Source: https://github.com/d99kris/nmail
- Documentation: https://github.com/d99kris/nmail#readme

## Install

### Linux

Native.

- Guix: `guix install nmail`
- Install script: `curl -fsSL https://raw.githubusercontent.com/d99kris/nmail/master/utils/install.sh | bash`

### macOS

Native.

- Homebrew: `brew install nmail`
- MacPorts: `sudo port install nmail`

### Windows

Not supported. Upstream supports Linux and macOS only.

### BSD

Not supported. Not packaged or documented for the BSDs.

### Android

Not supported.

## Protocols

- IMAP: Yes
- POP3: No
- SMTP: Yes
- JMAP: No
- Maildir: No
- mbox: No
- notmuch: No

## Features

- OpenPGP: No
- S/MIME: No
- OAuth2 sign-in: Yes
- Threads: No
- Search: local cache index and server search
- HTML mail: converted to text, or opened in an external browser
- Mouse: No
- Multiple accounts: No
- Offline use: local SQLite cache; offline mode and send queue
- Calendar: No
- Contacts: address book built from messages
- Vim-style keys: No
- Configuration: ~/.config/nmail/main.conf key=value file

## Pros

- Built-in IMAP and SMTP with setup wizards for Gmail, iCloud and Outlook
- Local cache, address book and outgoing queue can be encrypted
- Compose HTML mail using Markdown

## Cons

- One account per running instance
- No threaded view and no PGP or S/MIME
- Linux and macOS only; no Debian or Fedora package

## Use nmail with Forward Email

File: `~/.config/nmail/main.conf`

```
address=you@example.com
name=Your Name
user=you@example.com
imap_host=imap.forwardemail.net
imap_port=993
smtp_host=smtp.forwardemail.net
smtp_port=465
# Folder names must match the folders on the server
inbox=INBOX
drafts=Drafts
sent=Sent Mail
trash=Trash
spam=Spam
# Prompt for the alias' generated password at start instead of storing it
save_pass=0
```

| Protocol | Server | Port | Security |
| --- | --- | --- | --- |
| IMAP | imap.forwardemail.net | 993 | SSL/TLS |
| POP3 | pop3.forwardemail.net | 995 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 465 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 587 | STARTTLS |

Username: your full alias address. Password: the one from Generate Password next to the alias. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.

## Questions

### Does nmail work on Windows?

No. Upstream supports Linux and macOS only. See clients that run on Windows.

### Does nmail support IMAP?

Yes, nmail connects to IMAP servers directly.

### Is nmail open source?

Yes, under the MIT.

### How do I use nmail with Forward Email?

Use the config in the Forward Email section on this page, saved as ~/.config/nmail/main.conf, and replace the address and password with your own.

## Sources

- https://github.com/d99kris/nmail
- https://github.com/d99kris/nmail/blob/master/README.md
- https://github.com/d99kris/nmail/blob/master/LICENSE
- https://github.com/d99kris/nmail/blob/master/src/imap.cpp
- https://github.com/d99kris/nmail/blob/master/src/smtp.cpp
- https://github.com/d99kris/nmail/releases/tag/v5.16.4
- https://formulae.brew.sh/formula/nmail
- https://ports.macports.org/port/nmail/
- https://aur.archlinux.org/packages/nmail
