JmapEmailReadCommand (email/read.rs)

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

Rust command to fetch and display JMAP email bodies and headers.

// 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 read
//!
//! The `jmap email read` command, an `Email/get` asking for the body
//! values too.

use anyhow::Result;
use clap::Parser;
use io_jmap::rfc8621::email::{JmapEmailAddress, get::JmapEmailGetOptions};
use log::warn;
use pimalaya_cli::printer::{Message, Printer};

use crate::jmap::client::JmapClient;

/// Read the content of a JMAP email (Email/get with body).
///
/// Shows headers and plain text body by default.
#[derive(Debug, Parser)]
pub struct JmapEmailReadCommand {
    /// The email ID(s) to read.
    #[arg(value_name = "ID", required = true)]
    pub ids: Vec<String>,
    

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

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

Get a free API key