Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

javascript - 在Mailcore中获取最新的messageId?(Get latest messageId in Mailcore?)

I have 25 Lakh mails in my Gmail account but I want only the latest 7 days message or latest 100 mails only.

(我的Gmail帐户中有25万封邮件,但我只希望最近7天的邮件或最近100封邮件。)

How can I do it?

(我该怎么做?)

**function getMails**

IndexSet indexSet = IndexSet.indexSetWithRange(new Range(1, Long.MAX_VALUE));
    final IMAPFetchMessagesOperation messagesOperation = imapSession.fetchMessagesByUIDOperation(folder,
            requestKind, indexSet);

try: I want only 100 mails to get:

(尝试:我只希望获得100封邮件:)


IndexSet indexSet = IndexSet.indexSetWithRange(new Range(Long.MAX_VALUE-100, Long.MAX_VALUE));
    final IMAPFetchMessagesOperation messagesOperation = imapSession.fetchMessagesByUIDOperation(folder,
            requestKind, indexSet);

But it's not working

(但这没用)

  ask by Ravi Singh translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...