How to check for unread email
Материал из DRKB
Как проверить непрочитанную почту[править | править код]
var
Inbox: MAPIFolder;
NewMail: boolean;
begin
Inbox := NmSpace.GetDefaultFolder(olFolderInbox);
NewMail := (Inbox.UnreadItemCount > 0);
if NewMail then
ShowMessage(Format('Unread items in Inbox: %d', [Inbox.UnreadItemCount]));
end;
The constant olFolderInbox is defined in Outlook_TLB as $00000006.
Language: en
ID: 04454