New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
TroubleshootingUpdated 4 Nov 2026

winmail.dat attachment: what it is, why it appears and how to open or prevent it

A winmail.dat file is a TNEF container created by Outlook or Exchange. Learn how to open it as a recipient, and how senders and administrators stop it from being created.

LF
Written by Lena Fischer
European Deliverability and Privacy Liaison
Reviewed by Karan Malhotra
  • Published23 Oct 2023
  • Read time7 min
  • Length1,387 words
Share this guide

A winmail.dat attachment is a container in Microsoft's Transport Neutral Encapsulation Format (TNEF). Outlook or Exchange creates it when a message is sent in Rich Text Format, or when the server converts it that way, and it holds the formatting plus the real attachments. Mail programs that do not understand TNEF show only an unreadable file named winmail.dat, with the intended attachments hidden inside it.

If you received one, you can open it with a TNEF extraction tool or ask the sender to resend. If you send mail from Outlook or administer Exchange, you can stop it from being created by choosing HTML or plain text and by disabling TNEF for outside recipients. This guide covers all three roles.

What it isA TNEF container with application/ms-tnef content type and the file name winmail.dat
Why it appearsRich Text Format sending or server side conversion to non-Outlook recipients
Recipient fixOpen with a TNEF extractor, or ask for a resend as a normal attachment
Sender fixSend as HTML or plain text; disable TNEF in Exchange remote domain settings

What winmail.dat actually contains

TNEF is a Microsoft format that packages rich text formatting, embedded objects, calendar and meeting data, and file attachments into one binary blob. Outlook and Exchange understand it natively, so between two Outlook users nothing looks wrong. When the recipient uses another client, the message arrives with one attachment whose MIME header looks like this:

Content-Type: application/ms-tnef; name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="winmail.dat"

You can confirm the type by viewing the message source. If you are not sure how, see how to view email headers and source. The structure around attachments is explained in MIME attachments and multipart types.

Why Outlook creates it

  • Rich Text Format message. The sender composed the message in RTF format. RTF is an Outlook specific format and is best avoided for internet mail.
  • Contact setting. The recipient's contact entry in the sender's address book was set to send in Rich Text Format.
  • Server conversion. An Exchange remote domain setting, or an older default, converts messages to TNEF when sending to certain external domains.
  • Calendar and meeting items. Some meeting content and embedded objects travel in TNEF when sent from Outlook in particular configurations.
  • Forwarding. Forwarding an RTF original can keep the format.

Modern Outlook defaults to HTML for new messages, so a winmail.dat today usually points to an explicit RTF setting on the sender, the contact or the Exchange configuration.

How to open winmail.dat as a recipient

The attachment cannot be opened with an ordinary program, because the real files are inside. Use one of these routes. Tool names and availability change, so check each tool's own site and be careful to download only from official sources, since fake extractors are a known malware vector.

PlatformApproachNotes
WindowsA TNEF extractor or viewer applicationChoose a well known tool from its official site; scan the output files
macOSA TNEF viewer app from the App Store or a developer siteExtract, then open the files normally
LinuxThe tnef command line tool from your package managerRun it against the file to extract the attachments
Android and iOSA TNEF capable app, or open the message on a computerMobile support is limited
Any platformReply and ask the sender to resend as a normal attachmentOften the quickest and safest option
WebmailSome webmail providers decode TNEF automatically; others do notIf you see only winmail.dat, use a desktop tool or ask for a resend

On Linux the extraction is typically:

# Debian or Ubuntu
sudo apt install tnef

# Extract into a folder
mkdir extracted
tnef -C extracted winmail.dat
ls extracted

Package names and options vary between distributions, so read the tool's manual page (man tnef) if the command differs on your system. Never open an extracted executable or macro enabled document unless you trust the sender. If you did not expect the message, treat it as a possible phishing attempt: see how to recognise a phishing email.

How to stop sending winmail.dat from Outlook

As a sender, fix the cause so recipients receive normal attachments.

  1. Open a new message and check the message format. In classic Outlook, look at the Format Text tab and choose HTML or Plain Text instead of Rich Text. Menu names differ in new Outlook and in Outlook on the web, so confirm in Microsoft's current documentation.
  2. For replies, check the format of the original message, since replying can keep its format.
  3. Open the recipient's contact entry and check any setting that sends using plain text or rich text for that person. Set it to let Outlook choose the best format, or to plain text.
  4. In the Outlook options for mail composition, set the default compose format to HTML.
  5. Send a test to an external account on a different provider and view the attachments.

Plain text suits simple messages. For layout and images use HTML, and consider how clients display it: plain text email explains the trade-offs.

How administrators prevent it in Exchange

Exchange and Exchange Online decide whether to use TNEF for each remote domain. Setting TNEF off for the default remote domain prevents the server from sending winmail.dat to outside recipients. In Exchange Management Shell or Exchange Online PowerShell:

# See the current setting
Get-RemoteDomain Default | Format-List Name,DomainName,TNEFEnabled

# Never send TNEF to external recipients
Set-RemoteDomain Default -TNEFEnabled $false

The TNEFEnabled parameter takes three states: true forces TNEF, false disables it, and leaving it unset lets the sending client's preference decide. Another remote domain entry that targets a specific external domain can override the default, so list all of them with Get-RemoteDomain if a particular partner still receives winmail.dat. Changes can take a short time to apply. Run these commands with the right administrative role, test on a non-production domain first if you can, and confirm the current parameter details in Microsoft's Exchange documentation.

Verify that the fix worked

After changing the format or the Exchange setting, send a test message with a small attachment to a mailbox at a different provider than yours, ideally one that does not use Outlook. Open the original source of the received message and look at the structure. A healthy message has a multipart/mixed container with the attachment as its own part, with its real file name and type such as application/pdf. A message that still contains application/ms-tnef means TNEF is still being applied somewhere, so check the message format, the contact entry and any remote domain entry that matches the recipient's domain, in that order.

Remember that a message already sent stays as it was. Fixing the setting only changes new messages, and a forwarded or replied message may carry over the old format from the original. For recurring mail from shared mailboxes or distribution lists, test each sender identity separately, because a setting changed on your own profile does not change another mailbox's compose format.

What you seeDifferent causeWhere to look
Attachment with a random name and no extensionMissing or broken Content-Disposition headerInspect the MIME structure
Attachment shown as a long encoded stringEncoding problem in an old clientMIME encoded words
Attachment removed or replaced with a noticeSecurity gateway policyAsk the recipient organisation about attachment policy
Message bounced as too largeSize limit, not formatEmail size limits

Troubleshooting

ProblemLikely causeFix
Every message to Gmail or a Mac user has winmail.datSender uses RTF or contact set to RTFSwitch to HTML or plain text; check the contact setting
Only some recipients see itTheir clients lack TNEF supportAsk them to use an extractor; fix the sender side
Fixed in Outlook but still occurs from the shared mailboxExchange remote domain forces TNEFSet TNEFEnabled to false for the relevant remote domain
Extractor shows nothing insideContainer corrupted or only formatting dataAsk for resend
Mailing from an application, not OutlookApplication composes its own MIME; unlikely TNEFInspect the raw message and the library settings

Summary: winmail.dat is a TNEF wrapper from Outlook or Exchange, and it is best fixed at the source. Recipients can extract the hidden files with a TNEF tool or request a resend. Senders should use HTML or plain text, and administrators should disable TNEF for external remote domains. Apply the fix, send yourself a test through a different provider, and confirm the attachment arrives as a normal file.

Sending application mail with clean attachments? Submit standard MIME messages over a documented SMTP relay.

See the SMTP relay

References and further reading

Frequently asked questions

What is a winmail.dat file?

A TNEF container created by Outlook or Exchange that holds rich text formatting and the real attachments. Clients without TNEF support show only the container.

How do I open winmail.dat?

Use a TNEF extraction tool on your platform, such as the tnef command line tool on Linux, or ask the sender to resend the files normally.

Why do I receive winmail.dat from Outlook users?

The sender used Rich Text Format, a contact is set to send rich text, or Exchange converts messages to TNEF for your domain.

How can a sender prevent winmail.dat?

Compose in HTML or plain text and check the contact format setting. Administrators can set TNEFEnabled to false on the remote domain.

Is winmail.dat dangerous?

The format itself is not a virus, but it can hide attachments, so scan extracted files and treat unexpected messages with caution.

Topics#winmail.dat#tnef#outlook#attachments#rich text
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales