| name | himalaya |
| description | CLI email client for IMAP and SMTP. Use when reading, searching, composing, sending, or managing email via terminal. Covers account setup, envelope listing, message reading, sending raw RFC 5322 messages, folder management, attachments, flags, and multi-account configuration. |
Himalaya — CLI Email Client
Quick Start
himalaya envelope list -a hyperspace
himalaya message read -a hyperspace 4658
cat <<'EOF' | himalaya message send -a hyperspace
From: seyi@hyperspace.ng
To: recipient@example.com
Subject: Test Subject
Message body here.
EOF
himalaya account doctor hyperspace
Core Patterns
1. Account Configuration
Config file: ~/.config/himalaya/config.toml
Each account requires IMAP backend + SMTP send backend. See references/config-reference.md for full schema.
[accounts.hyperspace]
default = true
display-name = "Seyi"
email = "seyi@hyperspace.ng"
message.send.save-copy = false
[accounts.hyperspace.backend]
type = "imap"
host = "mail.hyperspace.ng"
port = 993
login = "seyi@hyperspace.ng"
[accounts.hyperspace.backend.auth]
type = "password"
raw = "YOUR_PASSWORD"
[accounts.hyperspace.backend.encryption]
type = "tls"
starttls = false
[accounts.hyperspace.message.send.backend]
type = "smtp"
host = "mail.hyperspace.ng"
port = 465
login = "seyi@hyperspace.ng"
[accounts.hyperspace.message.send.backend.auth]
type = "password"
raw = "YOUR_PASSWORD"
[accounts.hyperspace.message.send.backend.encryption]
type = "tls"
starttls = false
[accounts.hyperspace.folder.alias]
drafts = "Drafts"
trash = "Trash"
junk = "Junk"
2. Listing Envelopes
himalaya envelope list -a hyperspace
himalaya envelope list -a hyperspace --folder Sent
himalaya envelope list -a hyperspace --page-size 20
himalaya envelope list -a hyperspace -o json
3. Reading Messages
himalaya message read -a hyperspace 4658
himalaya message read -a hyperspace 4658 --no-headers
himalaya message read -a hyperspace 4658 -o json
4. Sending Messages
Himalaya accepts raw RFC 5322 format. It does NOT have --to, --subject flags.
cat <<'EOF' | himalaya message send -a hyperspace
From: seyi@hyperspace.ng
To: recipient@example.com
Subject: Hello
Body text here.
EOF
cat <<'EOF' | himalaya message send -a hyperspace
From: seyi@hyperspace.ng
To: recipient@example.com
Subject: HTML Email
Content-Type: text/html; charset=utf-8
<h1>Hello</h1><p>This is <b>HTML</b>.</p>
EOF
cat <<'EOF' | himalaya message send -a hyperspace
From: seyi@hyperspace.ng
To: recipient@example.com
Cc: other@example.com
Reply-To: noreply@hyperspace.ng
Subject: With CC and Reply-To
Body text.
EOF
5. Managing Flags
himalaya flag add -a hyperspace 4658 seen
himalaya flag remove -a hyperspace 4658 seen
himalaya flag add -a hyperspace 4658 flagged
himalaya flag add -a hyperspace 4658 deleted
6. Folder Operations
himalaya folder list -a hyperspace
himalaya folder add -a hyperspace "Archive"
himalaya folder delete -a hyperspace "Archive"
Important Notes
message send takes raw RFC 5322 on stdin — no --to, --subject, or --body flags.
save-copy = false — set this if the server's IMAP APPEND to Sent folder causes "unexpected tag" errors (common with cPanel/Dovecot).
- Password auth type is
password, not passwd or plain.
- Encryption types:
tls (IMAPS/SMTPS on dedicated port) or starttls (STARTTLS on plain port).
- Auth mechanisms:
password (auto-selects PLAIN/LOGIN) or oauth2 (for Gmail/Outlook).
- Use
-o json for scripting; -o plain (default) for human output.
- Use
--debug or --trace for troubleshooting connection issues.
References