JmapEmailGetCommand (email/get.rs)

himalaya · src/jmap/email/get.rs · rust · Apache-2.0
email, tag:knn-classified

Command fetches emails by ID via JMAP and displays them in a table.

// Source: https://github.com/pimalaya/himalaya | License: Apache-2.0 | Copyright 2022-2026 soywod <pimalaya.org@posteo.net>
// Provided via justclaw.it.com; keep this notice with the code.
//! # JMAP email get
//!
//! The `jmap email get` command, RFC 8621 `Email/get`.

use anyhow::Result;
use clap::Parser;
use log::warn;
use pimalaya_cli::printer::Printer;

use crate::{
    account::context::Account,
    jmap::{
        client::JmapClient,
        email::query::{EmailsChars, EmailsColors, EmailsTable},
    },
};

/// Get JMAP emails by ID (Email/get).
///
/// Fetches and displays email envelopes as a table.
#[derive(Debug, Parser)]
pub struct JmapEmailGetCommand {
    /// The email ID(s) to retrieve.
    #[arg(value_name = "ID", required = true)]
    pub ids: Vec<String>,
}

impl JmapEma

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key