# pter **Plain Text Email Renderer** — convert HTML email bodies into readable markdown. Email HTML is a hostile environment: table-based layouts from 2004, tracking pixels, Outlook conditional comments, deeply nested reply chains with inconsistent quoting. pter converts all of it into clean, readable markdown. ## Usage ```rust let html = r#"
This is an email.
"#; let markdown = pter::convert(html); assert_eq!(markdown, "# Hello\n\nThis is an **email**."); ``` ## What it does - Converts HTML elements to markdown equivalents (headings, links, lists, emphasis, code, images) - Unwraps table-based email layouts (single-cell tables become content, multi-column linearizes) - Detects and normalizes reply chains into `>` quoted markdown - Strips tracking pixels, invisible elements, and Outlook conditional comments - Produces output that is readable as plain text and renderable by any markdown toolchain ## What it does not do - Parse MIME email structure (use `mailparse` or `mail-parser` for that) - Extract article content from marketing templates (compose with a separate extractor) - Render markdown to a display format (use `pulldown-cmark`, `comrak`, etc.) ## License MIT