Running script on Exchange 2010
Asked Answered
I

1

3

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?

Inigo answered 12/3, 2012 at 19:45 Comment(0)
K
6

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.

Kirschner answered 12/3, 2012 at 20:10 Comment(2)
Cool! I've spent many hours over the last few months working with EWS, and didn't even realize it could handle events. That is indeed very useful.Turkestan
Wouldn't the best solution be to use SmtpReceiveAgent? Can you please detail your answer a bit more? I'm looking to do the same thing, but while I know how to code a script and a rule in Outlook, I'm completely new to administering Exchange, and I'd like a little more guidance on which method to use and how. Specifically, I have no access to Exchange but I'm getting resistance from the Exchange admins and I need to show them what to code and how to get our business need filled. All they told me was "no we can't run your rule and script on the server side", which I knew. Thanks!Copp

© 2022 - 2024 — McMap. All rights reserved.