MessageParseCommand (message/parse.rs)

himalaya · src/shared/message/parse.rs · rust · Apache-2.0
email, tag:knn-classified

Rust CLI command that parses raw email messages and outputs a structured view or part content.

// 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.
//! # Message parse
//!
//! The `message parse` command, printing the `message read` view of a raw
//! message read from a file or stdin, with no account and no
//! configuration.

use std::{
    fmt, fs,
    io::{IsTerminal, Read, stdin},
    path::PathBuf,
};

use anyhow::{Context, Result, anyhow, bail};
use clap::Parser;
use pimalaya_cli::printer::Printer;
use schemars::JsonSchema;
use serde::Serialize;

use crate::shared::{
    attachment::download::PartBytes,
    message::{part, read::MessageReadOutput},
};

/// Read a raw message without an account.
///
/// The message is read from the `EML` file,

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

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

Get a free API key