如何从iNotes获得未读邮件数量
Domino R8.x提供NotesView.GetUnReadEntries()方法,获得指定用户的未读邮件数量,但有时这个方法不知为什么不准确;可使用以下方法,通过Restful方式获得当前用户未读邮件数据。
URL地址:
http://localhost:port/mailpath/iNotes/Proxy/?OpenDocument&Form=s_ReadViewEntries&PresetFields=FolderName;($Inbox),UnreadCountInfo;1&Start=1&Count=0
可返回XML:
1<?xml version="1.0" encoding="UTF-8" ?> 2<readviewentries> 3 <viewentries timestamp="20110816T053034,85Z" toplevelentries="4"></viewentries> 4 <unreadinfo> 5 <foldername>($Inbox)</foldername> 6 <STRONG><EM><unreadcount>2</unreadcount></EM></STRONG> 7 </unreadinfo> 8</readviewentries> 通过此方法,只能获得当前用户的未读邮件数量。比如说:用户B有10封邮件,其中未读邮件数量为5,但如果使用用户A去读,将获得用户A在用户B邮箱中未读邮件数量。