func TestOutlook(t *testing.T) {
client, e := imapclient.DialTLS("outlook.office365.com:993", &imapclient.Options{DebugWriter: os.Stderr})
if e != nil {
panic(e)
}
if e = client.Login(username, password).Wait(); e != nil {
panic(e)
}
if _, e = client.Select("INBOX", nil).Wait(); e != nil {
panic(e)
}
if _, e = client.Status("INBOX", &imap.StatusOptions{NumMessages: true}).Wait(); e != nil {
panic(e) // <- panics here
}
}
This code produces the following error:
panic: in response: imapwire: expected CRLF, got " " [recovered]
panic: in response: imapwire: expected CRLF, got " "
From the debug output I can see that there is a space symbol after the ')' (second line), which go-imap does not expect:
T5 STATUS INBOX (MESSAGES)
* STATUS Inbox (MESSAGES 1)
T5 OK STATUS completed.
Code to reproduce:
This code produces the following error:
From the debug output I can see that there is a space symbol after the ')' (second line), which go-imap does not expect: