CF2 question regarding getting a message count

The WM5 phone I recently purchased (PPC6700) has no setting to automatically Send and Receive when an email message is put in the Outbox.  You have to manually press the Send and Receive menu.

And so I am writing an VB.Net app to cause the Send and Receive to happen automatically.  I have the part done that causes the Send and Receive to occur, but I need to make that happen only when an email is placed in the Outbox, as opposed to every X minutes or with the press of a button.

Hence my question.  Is it possible to enumerate the messages in a specific folder (Outbox) using CF2 and the POOM   I can't for the life of me figure out how.  If I have to I can try and figure out MAPI and write it in c++ but that may be a bit beyond my skill level at this point (it is my first mobile app).

Or, is it possible to use PIMPR_FOLDERNOTIFICATIONS on the Outbox instead of Contacts and Appointments

Any pointers would be much appreciated...



Answer this question

CF2 question regarding getting a message count

  • visuallll

    Unfortunately, at this time it is not possible to enumerate messages in a folder using the WindowsMobile managed classes. You will need to use MAPI notifications to detect the change.

    Here is a link to the API you would use:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/mob5lrfIMsgStoreAdvise.asp frame=true

    Listen for fnevObjectMoved events that indicate a message has been moved to the Outbox.

    Paul


  • Tukanos

    Thanks Paul!  I hadn't seen that one yet in my research, as I try to learn what I need to know about MAPI to make it work.  I'll definately post back here should I ever have success...


  • CF2 question regarding getting a message count