Add EML export implementation guide and GetManyRFC2822Task#106
Closed
Add EML export implementation guide and GetManyRFC2822Task#106
Conversation
Implements a new bulk export task that fetches RFC2822 data for all messages in a folder and writes them as .eml files to a directory. Processes messages in chunks of 50 with 1s pauses between batches, reports progress via task data deltas, supports cancellation via should_cancel, and resumes from last exported index on restart. Also adds a shared filename sanitizer (sanitizeEmlFilename) that produces collision-free filenames with index prefix and date suffix, with Windows MAX_PATH clamping. Includes detailed implementation guide for the client-side features: single email download, drag-and-drop, forward-as-attachment, and folder export UI. https://claude.ai/code/session_013AQPfia7V9Mxf4NL9peegn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive documentation for EML export functionality and implements the
GetManyRFC2822Taskin mailsync to enable bulk folder export. It includes a detailed implementation guide for the client-side features that will be built in the Mailspring repo.Key Changes
New documentation (
EML_EXPORT_IMPLEMENTATION.md): Complete architecture guide covering:GetMessageRFC2822TaskandGetManyRFC2822Task)New mailsync task (
GetManyRFC2822Task):.emlfilesshould_cancelflag{index} - {subject} - {date}.emlFilename sanitization helper (
sanitizeEmlFilename):Task routing: Added
GetManyRFC2822Taskhandling inperformLocalandperformRemotemethodsImplementation Details
task.data["progress"]after each chunk of 50 messages, enabling real-time progress bar updates in the clienttask.data["result"]with summary statistics and error listtask.data.progress.exportedto determine starting index on restarthttps://claude.ai/code/session_013AQPfia7V9Mxf4NL9peegn