Skip to content
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

MailKit fails to get emails from SmarterMail server 13.0 #150

Closed
vzhusel opened this issue Feb 17, 2015 · 4 comments
Closed

MailKit fails to get emails from SmarterMail server 13.0 #150

vzhusel opened this issue Feb 17, 2015 · 4 comments

Comments

@vzhusel
Copy link

vzhusel commented Feb 17, 2015

When I am trying to get emails from inbox folder on SmarterMail server I get disconnected from server.

2015-02-17 14:43:03.300 [82590:8645205] Debug:[DataSourceMailNavigationVC] Mail: Refresh
2015-02-17 14:43:03.329 [82590:8645702] Expected nz-number argument to 'UIDVALIDITY' RESP-CODE, but got: [atom: 0]
Expected nz-number argument to 'UIDVALIDITY' RESP-CODE, but got: [atom: 0]
2015-02-17 14:43:03.330 [82590:8645702] Debug:[ResilientMailService] Call failed 'Mail client failed: The ImapClient is not connected.'.

Log:

S: G00000004 OK XLIST completed
C: G00000005 SELECT Inbox
S: * 0 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 0] UIDs valid
S: * OK [UIDNEXT 1] Predicted next UID
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
S: G00000005 OK [READ-WRITE] SELECT completed

jstedfast added a commit that referenced this issue Feb 17, 2015
@jstedfast
Copy link
Owner

According to the IMAP RFC, the UIDVALIDITY value must be a non-zero unsigned integer:

resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text
                    ; Status condition

resp-specials   = "]"

resp-text       = ["[" resp-text-code "]" SP] text

resp-text-code  = "ALERT" /
                  "BADCHARSET" [SP "(" astring *(SP astring) ")" ] /
                  capability-data / "PARSE" /
                  "PERMANENTFLAGS" SP "("
                  [flag-perm *(SP flag-perm)] ")" /
                  "READ-ONLY" / "READ-WRITE" / "TRYCREATE" /
                  "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number /
                  "UNSEEN" SP nz-number /
                  atom [SP 1*<any TEXT-CHAR except "]">]

and nz-number is defined as:

nz-number       = digit-nz *DIGIT
                    ; Non-zero unsigned 32-bit integer
                    ; (0 < n < 4,294,967,296)

That said, I've committed a fix for this.

@vzhusel
Copy link
Author

vzhusel commented Feb 17, 2015

Thank you, do you know when you could update nuget package?

@vzhusel
Copy link
Author

vzhusel commented Feb 18, 2015

Verified, working as expected.

@vzhusel
Copy link
Author

vzhusel commented Feb 18, 2015

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants