Event for incoming mails

Add-in Express™ Support Service
That's what is more important than anything else

Event for incoming mails
 
Manuel Pöter




Posts: 2
Joined: 2006-07-21
Hi,

i have already searched the forum and found some posting where it says that I should use the OnAddItem-Event of the Inbox-Folder and the OnNewMail-Event.
I tried this out, but it seems that these events are called in no particular order. It happend that these events where called in the following order:

  • Add Item
  • NewMail
  • Add Item
  • Add Item
  • New Mail
  • Add Item
  • Add Item
  • New Mail
  • Add Item
  • New Mail
  • New Mail
  • New Mail

So how do I know which call to AddItem belongs to a "real new" mail and which not?

Regards, Manuel
Posted 21 Jul, 2006 04:46:42 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Manuel,

The NewMail event is an asynchronous event (occurs when one or more new e-mail messages are received in the Inbox). You can use the OnAddItems event only.

Posted 21 Jul, 2006 06:48:37 Top
Manuel Pöter




Posts: 2
Joined: 2006-07-21
Hi Dmitry,

during my tests, NewMail was called for each mail - when there were 7 incoming mails, NewMail was called 7 Times, although it was not in the same order as AddItem..

If I use the OnAddItem-Event only, is there a way to distinguish between new incoming mails and mails just copied to the inbox-folder?

How about IExchExtSessionEvents? Anybody who made some experiences with this kind of addin?

Regards, Manuel
Posted 21 Jul, 2006 07:24:12 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Manuel,

If I use the OnAddItem-Event only, is there a way to distinguish between new incoming mails and mails just copied to the inbox-folder?


I think you can use the UnRead and ReceivedTime properties.
Posted 21 Jul, 2006 10:28:43 Top