new e-mail notification

Hi,

is there a way to receive a callback to my application whenever a new incoming mail is received to the windows mobile (CE)'s inbox in outlook or other mail client application?

thanks, Ofer.

[213 byte] By [OferKalisky] at [2007-12-22]
# 1

In WIndows Mobile 5 it is possible using the classes in Microsoft.WindowsMobile.PocketOutlook namespace (PimItemCollection.ListChanged). This will work for all Pocket Outlook accounts but of course not for a 3rd party mail client. For WM2003 I recommend a 3rd-party library like the one offered by InTheHand

AlexFeinman at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...
# 3
With all due respect, the PimItemCollection does not contain EmailMessage object, so the ListChanged can not catch the incoming mail.
VictorTseng at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...
# 4
Each folder's Items property is a PimItemCollection-derived class. You need to use Inbox's ListChanged event
AlexFeinman at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...
# 5

I am unable to find the Inbox class or similar one in MSDN's PocketOutlook namespace list: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mobilesdk5/html/N_Microsoft_WindowsMobile_PocketOutlook.asp. Do I miss anything?

Now I am thinking about using the NEWMAIL_NOTIFICATION in the MAPI to catch new mail. Will post result later.

VictorTseng at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...