问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/9674329/running-script-on-exchange-2010