Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Unread Emails #51

Closed
nvijayap opened this Issue Sep 6, 2012 · 3 comments

Comments

Projects
None yet
3 participants

nvijayap commented Sep 6, 2012

Hello,

Is there a way to get just the unread emails? What option can I pass to find_items to be get just the unread emails?

Thanks very much.

Owner

zenchild commented Sep 6, 2012

I also replied to your other issue but here it is again if you didn't see that...

"Sorry I didn't get back to you sooner. I'm in the middle of a move and a job transition so things are a bit hectic right now. I also don't have access to an Exchange server any longer so I'm going to have to figure something out to vet any of your problems."

Cheers,

Dan

Owner

zenchild commented Dec 20, 2012

I'm not sure if you figured this out or not but here is the answer:

# normal auth/setup here
inbox = GenericFolder.get_folder :inbox

opts = {:restriction =>
  {:is_equal_to => [
    {:field_uRI => {:field_uRI=>'message:IsRead'}},
    {:field_uRI_or_constant => {:constant => {:value=> false}}}
  ]}
}

unread_items = inbox.find_items opts

@zenchild zenchild closed this Dec 20, 2012

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment