Le Café Central de Deva
..... Deva blogs!!
Transport Agent - Introduction
Exchange Server 2007 provides a class library based on the MS.NET Framework that enables you to implement transport agents that programmatically check and take action on transport events. It can be used to change and read the message contents during these events.
Transport agents enable you to access information about messages that travel through the Edge and Hub Transport servers. They have access to e-mail messages and their contents while the messages move through the transport services.
Installing an Agent
Once you compile the agent to a .dll; you must install and enable the agent on development Exchange server. At Exchange Management Shell(EMS), use the Install-TransportAgent command to install your agent, and the Enable-TransportAgent command to enable your agent.
For example you can make use of EMS to install and enable an agent named "MyAgeOne" by using a class derived from SmtpReceiveAgentFactory named MyAgentOne.MyAgeOneFactory.
Install-TransportAgent -Name "MyCustomAgent" -TransportAgentFactory "MyAgeOne.MyAgeOneFactory" -AssemblyPath "C:\myagents\MyAgeOne.dll"
Enabling an Agent
For example the agent MyCustomAgent on the server on which the agent is installed:
Enable-TransportAgent -Name "MyCustomAgent"