Manage TNEF Message Formatting with Remote Domains

Applies to: Office 365 for professionals and small businesses, Office 365 for enterprises, Live@edu

Do some of your users report that e-mail recipients in external domains can't open their messages that contain a Winmail.dat attachment? If so, the recipients in the external domain are probably using an e-mail client that doesn't support the Transport Neutral Encapsulation Format (TNEF). Microsoft Outlook is one of the few e-mail clients that support TNEF-encoded messages, although some third-party utilities can help convert Winmail.dat attachments.

You can configure remote domains to prevent your users from sending messages that contain the Winmail.dat attachment to all external domains or to specific external domains. The resulting messages are delivered as HTML or plain text.

  • Before you begin
  • Disable TNEF encoding for all messages sent to all domains outside your organization
  • Disable TNEF encoding for all messages sent to a specific domain outside your organization
  • Preserve TNEF encoding for any TNEF messages sent to domains outside your organization
  • What is TNEF?
  • TNEF conversion settings for external contacts and mail users
  • TNEF settings in Outlook
  • Order of precedence for TNEF message settings

Before you begin

To configure remote domains, you must use Windows PowerShell.

To learn how to install and configure Windows PowerShell and connect to the service, see Use Windows PowerShell in Exchange Online.

The following settings are available with the TNEFEnabled parameter on the Set-RemoteDomain cmdlet:

  • $true   TNEF is used for all messages sent to the destination domain.
  • $false   TNEF is never used for any messages sent to the destination domain.
  • $null   This is the default setting. TNEF messages aren't specifically allowed or prevented for recipients in the destination domain. Whether TNEF messages are sent to recipients in the remote domain depends on the specific setting on the mail contact or mail user, or the setting specified by the sender in Outlook.

Disable TNEF encoding for all messages sent to all domains outside your organization

Run the following command:

Set-RemoteDomain Default -TNEFEnabled $false

Top of page

Disable TNEF encoding for all messages sent to a specific domain outside your organization

In this example, the remote domain is fabrikam.com.

  1. Run the following command to create a new remote domain for fabrikam.com:

    New-RemoteDomain -Name Fabrikam -DomainName fabrikam.com
    
  2. Modify the default settings of the Fabrikam remote domain to disable TNEF encoding for all messages to the fabrikam.com domain:

    Set-RemoteDomain Fabrikam -TNEFEnabled $false
    

Note   If you create a remote domain for a specific destination domain, and the default settings for all destination domains conflicts with the same setting of the specific remote domain, the setting of the specific remote domain overrides the default settings for all destination domains. For example, if TNEFEnabled is $false for the default remote domain, and TNEFEnabled is $true for the fabrikam.com remote domain, TNEF-encoded messages are delivered to recipients in the fabrikam.com domain.

Top of page

Preserve TNEF encoding for any TNEF messages sent to domains outside your organization

Run the following command:

Set-RemoteDomain <domain name> -TNEFEnabled $null

For example, to preserve the TNEF encoding of messages sent to all domains outside your organization, run the following command:

Set-RemoteDomain Default -TNEFEnabled $null

Top of page

What is TNEF?

TNEF is a Microsoft-specific format that encapsulates MAPI message properties. A TNEF message contains a plain text version of the message and an attachment that packages the original formatted version of the message. Typically, this attachment is named Winmail.dat. The Winmail.dat attachment includes the following information:

  • Original formatted version of the message, including, for example, fonts, text sizes, and text colors
  • OLE objects, including, for example, embedded pictures or embedded Microsoft Office documents
  • Special Outlook features, including, for example, custom forms, voting buttons, or meeting requests
  • Regular message attachments that were in the original message

A MAPI-compliant e-mail client that fully understands TNEF, such as Outlook, processes the Winmail.dat attachment and displays the original message content without displaying the Winmail.dat attachment.

Depending on the application you use, TNEF may be referred to as any of the following values:

  • Rich text format
  • Outlook rich text format
  • MAPI rich text format

Note   The rich text message format is completely different from the rich text document format available in Microsoft Word.

An e-mail client that doesn't understand TNEF may present a TNEF message in any of the following ways:

  • The plain text version of the message is displayed, and the message contains an attachment named Winmail.dat, Win.dat, or some other generic name such as Attnnnnn.dat or Attnnnnn.eml where the nnnnn placeholder represents a random number.
  • The plain text version of the message is displayed. The TNEF attachment is ignored or removed. The result is a plain text message.

Top of page

TNEF conversion settings for external contacts and mail users

For external contacts and mail users in the shared address book, you can control the TNEF conversion settings for messages sent to the recipient with the UseMapiRichTextFormat parameter on the Set-MailContact and Set-MailUser cmdlets. The following values are available:

  • Always   TNEF is used for all messages sent to the recipient.
  • Never   TNEF is never used for any messages sent to the recipient.
  • UseDefaultSettings   This is the default value. TNEF messages aren't specifically allowed or prevented for the mail user or external contact. Whether TNEF messages are sent to the recipient depends on the specific setting for the corresponding remote domain or the setting specified by the sender in Outlook.

For example, to specify the messages sent to the external contact name Kim Akers should be formatted as plain text or HTML only, run the following command:

Set-MailContact "Kim Akers" -UseMapiRichTexFormat Never

Top of page

TNEF settings in Outlook

Outlook also has TNEF settings. These Outlook settings are listed in order of precedence from lowest to highest. A setting made at a higher level overrides a setting made at a lower level. The following Outlook TNEF settings are available:

  1. Set Rich Text as the default message format.
  2. Select Rich Text as the message format while composing the message.
  3. Set the default conversion setting for TNEF messages sent to all Internet recipients. This setting applies to external recipients only, and not to internal recipients in the organization. The following values are available:
    • Convert to HTML format   This is the default value. Any TNEF messages sent to external recipients are converted to HTML. Any formatting in the message should closely resemble the original message.
    • Convert to Plain Text format   Any TNEF messages sent to external recipients are converted to plain text. Any formatting in the message is lost.
    • Send using Outlook Rich Text Format   Any TNEF messages sent to external recipients remain TNEF messages.
  4. Set the individual TNEF conversion setting for an external recipient stored in the Contacts folder. The following values are available:
    • Let Outlook decide the best sending format   This is the default value. Outlook uses the default conversion setting for TNEF messages sent to all Internet recipients as described in the previous step. The default value of that setting is Convert to HTML format.
    • Send Plain Text only   Any TNEF messages sent to the external recipient are converted to plain text. Any formatting in the message is lost.
    • Send using Outlook Rich Text format   Any TNEF messages sent to the external recipient remain TNEF messages.

Top of page

Order of precedence for TNEF message settings

The order of precedence for the TNEF message settings is applied in the following order from lowest to highest. A setting made at a higher level overrides a setting made at a lower level.

  1. Outlook settings
  2. Mail user or mail contact settings
  3. Remote domain settings

Top of page