Backgroundinfo:
The Problem:
The Workaround:
That's it for the theory but I can't find the EventID I need, does it even exist? Am I looking in the wring places?
I tried sending an E-Mail whilst checking with the "Event-Viewer" if any Event fires, but nothing happens. The only Outlook ID's I can find are:
You will not meet such information in the Windows event viewer. Instead, I'd suggest developing a COM add-in for Outlook where you can handle the NewMailEx event of the Application class which is fired when a new item is received in the Inbox. See Walkthrough: Create your first VSTO Add-in for Outlook for more information.
The NewMailEx
event fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection
array to call the NameSpace.GetItemFromID method and process the item. Use this method with caution to minimize the impact on Outlook performance. However, depending on the setup on the client computer, after a new message arrives in the Inbox, processes like spam filtering and client rules that move the new message from the Inbox to another folder can occur asynchronously.
You can treat a VSTO add-in as a regular .Net application where you can do whatever you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With