jonhoo / rust-imap

IMAP client library for Rust
Apache License 2.0
490 stars 84 forks source link

stream the attachment contents #294

Open dongbin86 opened 2 months ago

dongbin86 commented 2 months ago

I'm using this library to read email content. The attachments might be numerous and large, and I want to stream the attachment contents and save them gradually to disk, rather than loading everything into memory at once. Does the library support this approach? If so, do you have an example?

jonhoo commented 1 month ago

No, unfortunately there isn't support for this at the moment. You could implement it manually by using the readline command that's exposed though. It'd be a good feature to add, though also non-trivial given the library's current design.