0

I am using JACOB. jar to access outlook . I am getting the count of my Inbox mails. how can I get the count of unread mail folder in outlook with JACOB. jar

Dispatch.call((Dispatch) myNamespace,"GetDefaultFolder", new Integer(6)).toDispatch();

with this code I am getting the count of the Inbox . I tried the values to 10 that is the integer value for contacts folder in outlook . can anyone help me to find the unread mail folder count in outlook.

αғsнιη
  • 2,627
  • 2
  • 25
  • 38
Nidhin
  • 167
  • 1
  • 5
  • 26

1 Answers1

0

You can access that folder using Store.GetSearchFolders().Item("Unread Mail"). If that folder exists.

If it does not exist, you can use Application.AdvancedSearch to search through all folders of a particular store.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • this we can use only with webmail i think . i want the outlook unread mail folder. please help me – Nidhin Oct 25 '14 at 05:20
  • I am not sure what you mean. Are you saying your code needs to run from a remote server instead of a machine where Outlook is installed? – Dmitry Streblechenko Oct 25 '14 at 18:47
  • yes . i needs to run from a remote server instead of a machine where Outlook is installed.thanks a lot if you can help me – Nidhin Oct 27 '14 at 06:11
  • If the user is using a local PST file with a POP3/SMTP account, you cannot access it fro ma remote server. If an Exchange mailbox is used, you can use EWS (http://msdn.microsoft.com/en-us/library/office/dd877045(v=exchg.140).aspx) for remote access. – Dmitry Streblechenko Oct 27 '14 at 13:58