mailledger-mime

Crates.iomailledger-mime
lib.rsmailledger-mime
version0.0.2
created_at2026-01-14 14:08:45.743591+00
updated_at2026-01-17 17:34:17.820921+00
descriptionMIME message parsing and generation library for email
homepagehttps://github.com/mqasimca/mailledger
repositoryhttps://github.com/mqasimca/mailledger
max_upload_size
id2042879
size56,001
Qasim (mqasimca)

documentation

README

mailledger-mime

MIME message parsing and generation library for email.

Features

  • Message parsing: Parse MIME messages with multipart support
  • Message generation: Build MIME messages with attachments
  • Encoding/Decoding: Base64, Quoted-Printable, RFC 2047 header encoding
  • Content types: Full MIME content type support
  • Multipart: Mixed, alternative, related message types

Quick Start

Parsing MIME Messages

use mailledger_mime::Message;

let raw_message = "From: sender@example.com\r\n\
                   To: recipient@example.com\r\n\
                   Subject: Test\r\n\
                   Content-Type: text/plain\r\n\
                   \r\n\
                   Hello, World!";

let message = Message::parse(raw_message)?;
println!("Subject: {}", message.subject().unwrap_or("(no subject)"));
println!("Body: {}", message.body_text()?);

Encoding/Decoding

use mailledger_mime::encoding::{encode_base64, decode_base64};

// Base64
let encoded = encode_base64(b"Hello, World!");
let decoded = decode_base64(&encoded)?;

// Quoted-Printable
use mailledger_mime::encoding::encode_quoted_printable;
let encoded = encode_quoted_printable("Héllo, Wørld!");

License

MIT License - see LICENSE for details.

Commit count: 6

cargo fmt