Mailspring
Mailspring copied to clipboard
[WIP] Download email/folder, using `.eml` format - Community#325
Work towards Export/Copy/Backup Emails
This pull request is the first (hopefully of many 😁) towards .eml support.
This PR provides:
- an option in the reply drop-down called "Download Email". Clicking this will prompt the user for the output directory and will save it upon selection
- right-clicking folder (excluding Drafts, Unread, Starred) gives an option to "Export the folder" (this will not create a directory, it just saves the messages in the path provided)
Need
Approval for the image, or leave it as is (no image) - if you want the image, how do I add it (linking it doesn't work)
Can I have thoughts on sub-folders? Do we just recurse over them and create the subdirectories by default, maybe have an extra option to say "Export just this folder"?
Help
The issue: I started to export almost 1500 emails, then clicked on one, it was only after all 1500 downloaded that the email was rendered.
Possible solution: I need to be able to deprioritise a task, when it's sent to mailsync, or have a new action, something like Action.queueBackgroundTasks. Either way, this would sit these tasks at the sideline while the other (more important) tasks come through.
This pull request has been mentioned on Mailspring Community. There might be relevant details there:
https://community.getmailspring.com/t/export-copy-backup-emails/325/17
This pull request has been mentioned on Mailspring Community. There might be relevant details there:
https://community.getmailspring.com/t/export-copy-backup-emails/325/18
Hey hey - this looks great! I think you're right that mailsync needs a mechanism for background tasks, and we likely need just one background task to represent the "export folder" operation so that it's easy to cancel + attach progress. I'm a bit worried that queueing tons and tons of individual tasks might cause problems.
I like the idea of adding a "priority" value to tasks and then sorting by priority when mailsync retrieves a task to run. Maybe something like that would work?
and we likely need just one background task to represent the "export folder" operation so that it's easy to cancel + attach progress. I'm a bit worried that queueing tons and tons of individual tasks might cause problems.
YES PLEASE!!!!!!!!!!!!!!!! 😂
And I agree, there wouldn't be an easy way of cancelling these tasks - if the user decided to
I like the idea of adding a "priority" value to tasks and then sorting by priority when mailsync retrieves a task to run. Maybe something like that would work?
That was my other choice and that would definitely work.
PS: sorry if there's any shoddy code. Full discretion, I have almost no experience with React and Electron 😁