Platform SDK: Exchange Server

Message Translation

Message translation is the process by which a gateway converts between MAPI’s message format and the message format of the foreign system that the gateway serves, for both incoming and outgoing messages. This translation is done on the basis of the message class of incoming and outgoing messages.

Translation has to be done on the basis of message class because different MAPI message classes support different sets of properties. This means there cannot be one algorithm for converting a MAPI message into the foreign system’s message format. Similarly, if the foreign system’s message format supports its own concept of message classes, then separate translation algorithms are necessary to handle the message classes defined in the foreign system. If the foreign system does not have a concept of message classes, you can choose a a constant string for the gateway to use as the message class of incoming messages.

Microsoft Exchange Server provides a framework for message translation that gateways use. Gateways enter as many translation DLLs as they need into the Windows NT Registry so that the appropriate translation program is called when the gateway needs to translate each incoming or outgoing message. When developing your gateway, you must also provide these translation DLLs. A translation DLL is considered appropriate for a message if the message class string supported by the DLL is a proper prefix of the message class string of the message to be translated. If more than one DLL is applicable to a particular message, the one with the closest matching message class string is used.

There are two primary advantages of this approach over embedding translation code directly in your gateway. One is that you may change the translation code or add new translations without recompiling the gateway. The other is that translation DLLs may be added or changed while a gateway is running.