langmail 0.11.2

Email preprocessing for LLMs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use langmail::preprocess;

static EML: &[u8] = include_bytes!("../../../fixtures/google-app-access-expiring.eml");

#[test]
fn test_implausible_date_falls_back_to_received() {
    let output = preprocess(EML).unwrap();
    let date = output.date.expect("email should have a date");

    assert!(
        date.starts_with("2026-03-08"),
        "expected fallback to Received header date in March 2026, got {date}"
    );
}