Skip to main content

Mail CLI scaffold targeting Exmail IMAP/SMTP workflows

Project description

Mail CLI

Mail CLI - An open-source email command-line tool for managing emails from the terminal.

Documentation

  • Chinese product standard doc: docs/README.zh-CN.md
  • Chinese command reference: docs/COMMANDS.zh-CN.md
  • Release guide (Chinese): docs/RELEASING.zh-CN.md
  • Changelog: CHANGELOG.md
  • Requirements issues: https://github.com/andyWang1688/mailcli/issues?q=is%3Aissue+is%3Aopen+label%3Arequirement
  • Bug issues: https://github.com/andyWang1688/mailcli/issues?q=is%3Aissue+label%3Abug

Quick Start

Installation

Preferred installation method: pip direct install.

Option A: Install from PyPI (target release channel)

pip install exmail-cli

After publishing to PyPI, this is the recommended way for all users. The installed CLI command remains mailcli.

Publishing strategy: merge to main does not publish; pushing a version tag like v0.1.0 publishes to PyPI.

Option B: Install from local source (current development stage)

cd ~/Downloads/mailcli
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install .

Verify installation:

mailcli --help

Configuration

Copy the example configuration to your home directory:

mkdir -p ~/.config/mailcli
cp config/config.example.toml ~/.config/mailcli/config.toml

Edit the configuration file with your email account details:

default_account = "exmail-main"

[accounts.exmail-main]
email = "your.name@example.com"
use_ssl = true

[accounts.exmail-main.imap]
host = "imap.exmail.qq.com"
port = 993

[accounts.exmail-main.smtp]
host = "smtp.exmail.qq.com"
port = 465

[accounts.exmail-main.auth]
raw = "your_app_password_or_token"

[quirks]
provider = "exmail"

Usage

Detailed command guide (Chinese):

  • docs/COMMANDS.zh-CN.md

Architecture

  • docs/plan/: execution plans and milestones
  • docs/architecture/: architecture and directory conventions
  • src/mailcli/core/: business logic
  • src/mailcli/providers/: provider-specific quirks (e.g., Exmail)
  • src/mailcli/infra/: infrastructure (IMAP/SMTP, config, output)
  • tests/: unit and integration tests

Development

Run tests:

source .venv/bin/activate
python -m pytest tests/ -v

# Or use the test script
./test.sh

See TESTING.md for detailed test coverage.

Current Status (v0.1)

Completed (M1-M3)

  • M1: CLI + Config + Diagnostics

    • CLI framework with command groups
    • Configuration loading (TOML)
    • Error handling and output formatting (plain/json)
    • IMAP/SMTP connection adapters
    • Account management (list, default, diagnose)
  • M2: IMAP Operations

    • Envelope list and search
    • Message read
    • Attachment list and download
  • M3: SMTP Operations

    • Message send

Summary

  • 13 Python source files (~1200 lines)
  • 3 test files with 14 tests
  • Full support for Exmail IMAP/SMTP workflows
  • All core commands support --output json

Next Steps

  • Additional provider support (Gmail, M365)
  • Folder management
  • Flag operations
  • Message operations (write, reply, forward)
  • HTML email support
  • Multiple attachments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exmail_cli-0.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exmail_cli-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file exmail_cli-0.1.0.tar.gz.

File metadata

  • Download URL: exmail_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exmail_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1aea709f77139f9eec6e883968fc090fdf81540d46ed81253dd43c7abf9ed63f
MD5 501edd88ee455c20dfadce50dab1e9a4
BLAKE2b-256 9ec0a9456ad3ce3b8caa91ae2a71b796a52b0254ae26b5f1ada0da005e3e8c07

See more details on using hashes here.

File details

Details for the file exmail_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: exmail_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exmail_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa62e3cd40ee9d55f7eaf15531b4dee728e99f29055c980ed08d6f995491ac14
MD5 663f19bc415da006cc0680fdb7abd8dc
BLAKE2b-256 4d55136c3901e905e64e41244358bb6e44377da1539c8ab10e53178198631dfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page