MAPI supplies the ITnef interface that provides several methods for TNEF encoding and message handling. The OpenTnefStreamEx function provided by MAPI offers three modes of operation:
Compatibility mode This mode supports Microsoft Mail 3.2 and encapsulates only those properties that are supported by Microsoft Mail 3.2.
Best data mode This is the default TNEF mode. It uses Microsoft Mail 3.2 format and also includes message attributes that would need to be downgraded for Microsoft Mail 3.2. It includes these latter attributes as MAPI encapsulation. If they arrive on a MAPI client, they can be read. The cost of this mode is that it increases the message size.
Pure mode This mode encapsulates only MAPI properties. If another type of client receives the message, it cannot read the message. This mode provides the maximum message fidelity for MAPI clients.
A gateway should carry out its encapsulation using the appropriate mode. If no configuration option is provided, the gateway should encode using best data mode at the expense of the message size overhead.
For more information about implementing TNEF, see the MAPI Programmer’s Reference.