Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Unread Emails #51

Closed
nvijayap opened this Issue · 3 comments

3 participants

@nvijayap

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.

@zenchild
Owner

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

@zenchild
Owner

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
@josephbridgwaterrowe

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.