Question

I want to run a script when an email is received on my exchange server. I really don't have a great direction on how to implement this. I've written my script in VB and tested it on outlook. I incorrectly assumed you can run a script from a rule in Exchange like you can in Outlook.

Any help would be greatly appreciated. Should I be using smtpreg.vbs or EWS or something completely different?

Was it helpful?

Solution

Exchange used to rely on event sinks for this kind of processing, but this is deprecated and not supported anymore in Exchange 2010; as the linked article says, the preferred way to handle events are now either developing a custom transport agent or using Exchange Web Services.

What you may be most interested in are EWS event notifications:

http://msdn.microsoft.com/en-us/library/aa579128(v=exchg.140).aspx
http://msdn.microsoft.com/en-us/library/bb204076(v=exchg.140).aspx

The last link provides some code samples, too.

As usual, since this is more of a developer-oriented question, StackOverflow is probably a better place to ask for detailed help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top