-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client: extend APPEND to support optional flags #61
Conversation
I've tested this on Mailbox.org and GMail, and I'm under the impression it works as-expected. |
Thank you! Three thoughts:
|
Unless I'm mistaken, don't we already indirectly depend on
This is fair enough (though this library is pre-
Will do. |
You're right that it's common, though I actually don't think we currently do! If I'm wrong, I still think there's an advantage to interacting with standard types first unless other types present a significant advantage though.
Yeah, I just took another gander at the docs, and looks like there is simply no way to print them at all. So I guess ignore what I said above, and consider
Nope nope nope, let's not do that. This is part of why I wrote #58; I want to get away from non-semantic types.
While it's true the crate is pre-1.0, I think it likely should be. We have some users, and breaking things isn't great. I think it's only not 1.0 because in the past 0.X wasn't considered materially different from 1.X. This is obviously changing. Once #58 lands, I think we should seriously consider tagging 1.0.
Thanks! I know it's a little annoying, though I'd rather have more methods that are more explicit and have fewer arguments. |
As an aside, this is something I'm looking forward to, because I'm currently parsing IMAP4 return messages using regular expressions. As someone coming from Python (which has |
https://github.com/djc/tokio-imap may also have what you want as an alternative. |
According to RFC3501[1], the APPEND command supports optional flags for the datetime of the message receipt, and a set of flags to be applied to the message. Implement this in imap-rust, using the same formatting as the Python imaplib equivalent code. [1]: https://tools.ietf.org/html/rfc3501#section-6.3.11 Signed-off-by: Aleksa Sarai <[email protected]>
This completely escaped my mind, so sorry about that! I think you'll need to rebase onto I would love to see a test of this method to see that it generates the expected IMAP commands. In particular, with different combinations of arguments ( |
I think we also want to align this with #99 somehow. |
I haven't touched this in a very long time... Feel free to carry or close it. Personally this was one of my first projects in Rust, and I was quite disappointed that I couldn't find a Rust library that handled IMAP correctly (Python has it in stdlib, the Go one is pretty solid, and so on) -- to me it indicated that the language's ecosystem isn't ready yet (I've written other system tools in Rust, but I ended up just wiring up most of the syscalls myself -- so I was just using the core language). Don't take this as me saying I'm unhappy with you specifically or anything, it's just an expected outcome when you have a not-yet-mature language ecosystem. I do really hope that the Rust community will come up with a core set of third-party libraries that are generally well-maintained and do their job completely and correctly, because I still am excited about the language but the way third-party libraries work (especially with the ease of creating crates -- something I really disliked about NPM and now I dislike about crates.io) makes me quite hesitant about it all. |
You're certainly right that Rust's ecosystem is still young, but I think things have improved since you first looked at this. I'm not quite sure what your specific concern is with "the way third-party libraries work" though? I've found For I'll leave this open for the time being, as I believe it is an important thing to add, and this is a good starting point. |
I've had to move the repository under my own control so that I can set up CI and such correctly following the resolution to #69, so I will actually close this. Feel free to open it as a new PR against https://github.com/jonhoo/rust-imap if you have the time, but no worries if you don't! If you do, including a link back to this for later reference is probably also a good idea :) |
According to RFC3501, the APPEND command supports optional flags for
the datetime of the message receipt, and a set of flags to be applied to
the message. Implement this in imap-rust, using the same formatting as
the Python imaplib equivalent code.
Fixes #60
Signed-off-by: Aleksa Sarai [email protected]