Body Conversion Sample Application
The Body Conversion sample shows you how to filter scripts out of email messages. This sample application does this by determining the format of the incoming message and deciding if filtering must occur. If filtering is needed, the content is converted to HTML, filtered, and then converted back to the source format.
To download this sample, download the Exchange 2010 Transport Agents SDK from the Microsoft Download Center.
The Body Conversion sample agent consists of a simple MicrosoftVisual Studio .NET 2005 C# project. By default, the files are installed in the directory in which the Exchange Server 2010 Transport Agents Software Development Kit (SDK) is installed, in the \Samples\BodyConversion folder.
The following are the primary files for the sample:
Install.ps1 An Exchange Management Shell script to install the compiled sample.
Uinstall.ps1 An Exchange Management Shell script to uninstall the compiled sample.
BodyConversion.csproj The Visual Studio C# project file.
BodyConversion.cs The C# source code for the sample.
To build the Body Conversion sample agent, you must first install Visual Studio .NET 2005 and the Microsoft.NET Framework version 2.0 on the computer that is running Exchange Server 2010 that has the Edge Transport server role installed.
After you install the required software, open the C# project by using Visual Studio .NET. If it is necessary, update the references to the Microsoft.Exchange.Data.* namespaces. Build the project and fix any errors you encounter.
To install the Body Conversion sample agent
Edit the install.ps1 script to make sure that the $EXDIR variable is correctly initialized for your system. The value of the $EXDIR variable should be the path of the Exchange Server 2010 installation directory.
Open the Exchange Management Shell and run the install.ps1 script.
Restart the Exchange 2010 computer.
To uninstall the Body Conversion sample agent
Edit the uninstall.ps1 script to make sure that the $EXDIR variable is correctly initialized for your system. The value of the $EXDIR variable should be the path of the Exchange Server 2010 installation directory.
Open the Exchange Management Shell and run the uninstall.ps1 script.