Skip to content

feat(eml): add local EmlConverter supporting header extraction, body parsing, and recursive attachment conversion#2206

Open
saitejabandaru-in wants to merge 1 commit into
microsoft:mainfrom
saitejabandaru-in:feat/local-eml-converter
Open

feat(eml): add local EmlConverter supporting header extraction, body parsing, and recursive attachment conversion#2206
saitejabandaru-in wants to merge 1 commit into
microsoft:mainfrom
saitejabandaru-in:feat/local-eml-converter

Conversation

@saitejabandaru-in

Copy link
Copy Markdown

Description

This PR introduces a local EmlConverter to natively support parsing .eml (email) files.

Key Changes

  1. Added EmlConverter: Uses the built-in Python email module to extract standard email headers (From, To, Subject, Date) and the email body (with HTML bodies automatically converted to Markdown).
  2. Recursive Attachment Conversion: Iterates through message attachments, recursively parsing them using the main MarkItDown instance, and appends the converted content under ## Attachment: <filename> headings (matching the pattern used by ZipConverter).
  3. Unit Tests: Added a robust end-to-end unit test to verify header extraction, body parsing, and recursive attachment handling.

Closes #1662.

…parsing, and recursive attachment conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EmlConverter: add support for converting email attachments

1 participant