Detect new mail

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

Detect new mail
 
Daniel Modler




Posts: 3
Joined: 2006-09-28
Hi,

As an addon for a large .NET application we are using your Addin-Express tool in order to save all received and sent emails in our application. We want offer functionality to scan a full folder (already done) and to scan emails as they arrive in a folder - this can be a new mail arriving, a mail being dragged into a folder, or a mail being sent and therefore appearing in "Sent Mails". However, we don't want to be limited to the special folders "Inbox" and "Sent Mails". Any other folder could be selected in our tool.

How can we detect if a mail appears in a folder (no matter through which action), and find out the entryid of this mail?

I already thought of using a timer, polling the number of items when the timer is fired, and comparing the contents of a folder against list. But this would be unrealiable and slow.
Is there a better way to do this using your AddinExpress-Tool?

dm
Posted 28 Sep, 2006 07:47:08 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Hi Daniel.

Now we are working on a new component for 'ADX Extensions for Outlook' product that will be responsible for intercept of events of MAPI storages. This component will help you to implement your idea.
I think we will publish it next month.
Posted 28 Sep, 2006 12:23:47 Top
Daniel Modler




Posts: 3
Joined: 2006-09-28
Hi Sergey,

Thanks for your reply.

I found an "OutlookFolderItemsEvent" example coming with the installation, which seems to do what I need. It notifies me if some item is added to a folder, no matter how this is done.

Since you are talking about the new product, would there be some problem when solving my task using the OutlookItemsEvents class?

dm
Posted 29 Sep, 2006 04:03:51 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Hi Daniel.

Of course, you can use the OutlookItemsEvents class in your project but there is a known issue in Outlook.
Sometimes Outlook doesn't notify event classes about items that have been added to a folder. It happens when you select several items (about 17 and more) and move/copy them to the target folder. If this behaviour doesn't stop you, the OutlookItemsEvents class is the correct choice.
Posted 29 Sep, 2006 16:20:24 Top
Daniel Modler




Posts: 3
Joined: 2006-09-28
Hi Sergey,

This should be enough as a first solution; however we are looking forward to your new component.

Thanks!
dm
Posted 02 Oct, 2006 05:40:27 Top