Skip to main content

parse_headers_only

Function parse_headers_only 

Source
pub fn parse_headers_only(raw: &[u8]) -> Result<ParsedEmail, Error>
Expand description

Parses only the headers of a raw email message, skipping body/MIME processing.

This is faster than parse_email when only metadata is needed (e.g., building a message list). Body-related fields (body_text, body_html, attachments) are always empty/None.

ยงReferences

  • RFC 5322 (Internet Message Format)
  • RFC 2047 (encoded words)