By Updated 5 min read

How to Prevent Winmail.dat: Outlook Settings Guide

Recipients usually get winmail.dat because the sender's Outlook sends in Rich Text. Following Microsoft's documentation: setting the default format to HTML, switching a single message, what to check when it still happens, and how an administrator stops it.

If someone tells you an email from you arrived with a file called winmail.dat they cannot open, the cause is usually a setting in the sender's Outlook, and sometimes the sending organisation's mail server. Either way, nothing on the recipient's side stops it.

Microsoft explains that when a message is in Rich Text format, Outlook packages it in TNEF, a Microsoft-specific format. If the recipient's messaging system cannot process that format, an attachment named Winmail.dat is added. It can hold the formatted text and the ordinary attachments you added, which the recipient then cannot see.

Set the default format to HTML

In classic Outlook for Windows, change the format new messages are written in:

  1. Go to File > Options > Mail.
  2. In Compose messages in this format, select HTML (or Plain Text). If it says Rich Text, that is the most common cause.
  3. Select OK.

According to Microsoft, once the default message format is HTML or plain text, Outlook does not use TNEF for outgoing messages unless an Outlook feature needs it.

Switch a single message

In the message window, choose Format Text, then HTML (from Microsoft's "Change the message format" article). That message will not use TNEF unless an Outlook feature needs it.

If winmail.dat still appears

  • It was a reply or a forward — Outlook replies and forwards in the format of the message you received (as Japanese PC maker NEC's support page puts it). A reply to a Rich Text message stays Rich Text even with HTML as your default, so switch that message as above.
  • The message used a feature that needs TNEF — Microsoft lists meeting requests and responses, voting buttons, task requests, rich text formatting and embedded attachments as requiring TNEF. A message using one of them can still go out as TNEF with HTML as the default. The same article recommends choosing HTML or plain text by hand when you send attachments to recipients who do not use Outlook; ordinary attachments do not need TNEF.
  • It happens with every outside recipient — According to Microsoft, Outlook has a setting for how Rich Text messages are handled when sent to external recipients (Internet message format), and its default is Convert to HTML format (the names used in Microsoft's Exchange Server article). If it is set to Send using Outlook Rich Text Format, they go out as Rich Text.
  • It only happens with certain people — Microsoft also describes per-contact settings (Internet recipient message format), though one of its articles describes them as an Outlook 2010-and-earlier feature. Check that no setting still sends Rich Text to that person.
  • The organisation's mail server — In Exchange Online, admin settings override user settings (Microsoft). If your own settings do not fix it, ask your administrator to check the admin settings.

Stop it in the registry

Microsoft also documents a DisableTNEF registry entry that keeps Outlook from using TNEF for outgoing messages, again unless a feature needs it. The steps, from Microsoft's article:

  1. Create a text file named disable-tnef.reg.
  2. Paste in the following and save the file.
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Preferences]
"DisableTNEF"=dword:1
  1. Double-click disable-tnef.reg and select Yes when asked.
  2. Restart Outlook.

To undo it, delete DisableTNEF at that location in Registry Editor or set it to 0, and restart Outlook. A mistake in the registry can affect Windows itself, so on a work PC ask your administrator first.

New Outlook and Outlook on the web

New Outlook for Windows offers two message formats, HTML and plain text; Rich Text is not one of them. Microsoft says Outlook on the web can read messages formatted in Rich Text but cannot format or send in that format. If mail sent from these still arrives with a winmail.dat, look at the organisation's admin settings rather than the sender's format setting.

Stopping it as an administrator (Exchange Online)

A Microsoft 365 (Exchange Online) administrator can stop TNEF on outgoing mail. According to Microsoft, remote domain settings override the per-recipient settings set by admins or users.

  • Only for the affected domain — In the Exchange admin center, go to Mail flow > Remote domains, create a remote domain for the recipients' domain and set Use Rich-text format to Never. Microsoft suggests this value when the remote domain does not use Exchange. A specific remote domain's settings override the default remote domain's for that domain (Microsoft), so keep its other settings, such as automatic replies and forwarding, the same as the default's.
  • For every destination — Changing the default remote domain (Default) applies to every external recipient. Microsoft, however, suggests Follow user settings when you do not know what email system the remote domain uses, and with TNEF off, Outlook users outside your organisation no longer get features such as voting buttons.

In PowerShell (connected to Exchange Online PowerShell), this creates a remote domain for the recipients' domain (contoso.com in Microsoft's example) and stops TNEF for messages sent to it. To change the default remote domain instead, use -Identity Default. A remote domain created with New-RemoteDomain allows automatic forwarding by default (Microsoft), so set its other options, such as automatic replies and forwarding, to match the default remote domain.

New-RemoteDomain -Name Contoso -DomainName contoso.com
Set-RemoteDomain -Identity Contoso -TNEFEnabled $false

With $false, every Rich Text message is converted to HTML or plain text. The default (blank) leaves it to each user's and contact's settings.

Checking that it worked

The surest check is to send a new message with an attachment to the person who told you about the winmail.dat, and ask them to confirm. If the cause was a per-recipient or organisation setting, a test to another address such as Gmail may not show any difference.

Sources: Microsoft's "How message format affects email messages", "Change the message format to HTML, Rich Text Format, or plain text in Outlook", "Exchange Server: TNEF conversion options", "Message format and transmission in Exchange Online", "Remote domains in Exchange Online", "Manage remote domains in Exchange Online" and "Set-RemoteDomain", and NEC's support page (in Japanese).

Frequently asked questions

I'm the one receiving it. Can I fix it on my side?
No. Whether a message goes out as TNEF is decided by the sender's Outlook or the sender's organisation's mail server. For the ones that already arrived, the winmail.dat viewer on this site gets the attachments out.
Should I choose HTML or plain text?
According to Microsoft, either one stops Outlook using TNEF, except where an Outlook feature needs it. Choose HTML if you use formatting or images, plain text if you do not.

About the author

Ren

Developer, OpenedFile

I build and maintain OpenedFile on my own. It started when a winmail.dat attachment landed in my inbox and nothing would open it — and every online converter I found wanted me to upload the file to their server first. So I wrote a TNEF parser from scratch instead, and every tool here has run entirely in the browser ever since.

More about OpenedFile

Related Tools