You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C: a2 ID NIL
S: * ID ("name" "Coremail Imap" "vendor" "Mailtech" "TransID" "I186cXsAACfQ+GDj71IA")
S: a2 OK ID completed
code like this:
// by Client::login()typeImapSession = imap::Session<native_tls::TlsStream<std::net::TcpStream>>;pubfnid(s:&mutImapSession) -> Result<(),Box<dyn std::error::Error>>{let id = "ID NIL";// Err(Parse(Invalid([...])))// [...] is [u8] of * ID ("name" "Coremail Imap" "vendor" "Mailtech" "TransID" "I186cXsAACfQ+GDj71IA")let res = s.run(id);// panicked at 'assertion failed: `(left == right)` src\client.rs:1335:25let res2 = s.run("NOOP");Ok(())}
failing to parse * ID ("name" "Coremail Imap" "vendor" "Mailtech" "TransID" "I186cXsAACfQ+GDj71IA") can be ignored,
but tagged a2 OK ID completed is left in the stream, and following commands will panic immediately as assertion failed.
sequence of crate's view:
C: a2 ID NIL
S: * ID ("name" "Coremail Imap" "vendor" "Mailtech" "TransID" "I186cXsAACfQ+GDj71IA")
C: a3 NOOP
S: a2 OK ID completed
So am I missing anything to get workaround to this?
The text was updated successfully, but these errors were encountered:
Ah, no, there isn't currently a way to get at the raw connection. Client and Sessiondo both deref to the public (but #[doc(hidden)]) [Connection type](https://github.com/jonhoo/rust-imap/blob/b656618987ccd2843cf0090fcfa5d498b07d991c/src/client.rs#L130], which does have a readline method, though it's currently pub(crate). I think there's a decent argument for exposing a decent low-level interface for manually implementing commands the way you want to do here, so if you want to take a stab at contributing that, that'd be awesome! The main thing to keep an eye out for is to get tagging right, so that if you manually run a command, it'll get a distinct tag from any other commands (see self.tag). @mordak may also be able to point you in the right direction.
I'm trying to perform an IMAP4 ID extension command manually.
command and response sequence would be like this:
code like this:
failing to parse
* ID ("name" "Coremail Imap" "vendor" "Mailtech" "TransID" "I186cXsAACfQ+GDj71IA")
can be ignored,but tagged
a2 OK ID completed
is left in the stream, and following commands will panic immediately as assertion failed.sequence of crate's view:
So am I missing anything to get workaround to this?
The text was updated successfully, but these errors were encountered: