Adding support for Gmail extensions
CrispinStichart opened this issue · comments
Gmail added a few non-standard extensions to the IMAP protocol, for handling labels and a few other things.
What's this project's stance on supporting non-standard extensions?
I'm not against adding these in, probably behind a trait of some kind so that users have to explicitly say they want access to those methods. Or maybe better yet, through a
impl Session {
fn gmail(&mut self) -> Option<GmailClientExtensions<'_>> {}
}
which returns None
if the appropriate capability is present on the server.
Okay, cool. I'll give it a shot. ^_^
Well, that was easy -- it turns out that support for Gmail labels (which was the only thing I care about) was added to imap-proto
a couple of months ago.
Unfortunately, they haven't made a release yet that includes those changes.
In the meantime, I forked rust-imap
, switched the imap-proto
dependency to pull from the git, and did what needed to be done: CrispinStichart@6e5ec17
You'll notice I deleted NameAttributes
entirely, because imap-proto
implemented that with this commit: djc/tokio-imap@4f60707
@djc Any chance we could have a new imap-proto
release with the label changes?
I just published imap-proto 0.16 to crates.io.
Thank, djc!
I made a pull request for this: #225