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

searching for UNSEEN emails is returning empty list #21

Closed
ermamud opened this issue Dec 13, 2019 · 1 comment
Closed

searching for UNSEEN emails is returning empty list #21

ermamud opened this issue Dec 13, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@ermamud
Copy link

ermamud commented Dec 13, 2019

To Reproduce

    ImapClient client = new ImapClient();
    await client.connect("imap.mail.yahoo.com", 993, true);
    await client.authenticate(new ImapPlainAuth("******", "*****"));
    ImapFolder inbox = await client.getFolder("inbox");
    List<int> emails = await inbox.search('UNSEEN');

in this case the emails list has 1 positon with null value.

Expected behavior
Search should return the email ID list

@ermamud ermamud added the bug Something isn't working label Dec 13, 2019
@michaelspiss
Copy link
Owner

I was able to reproduce with the following log

[INFO] imap_client: S: * 1 EXISTS
* 0 RECENT
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Unlimited
* OK [UNSEEN 1] Message 1 is first unseen
* OK [UIDNEXT 148] Predicted next UID
* OK [UIDVALIDITY 1513286925] UIDs valid
A4 OK [READ-WRITE] SELECT completed

[INFO] imap_client: C: A5 UID SEARCH UNSEEN

[INFO] imap_client: S: * SEARCH 147
A5 OK UID SEARCH completed

[null]

Seems like the catching doesn't work - I'll have to look into it as soon as my schedule allows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants