ANAVEM
Reference
Languagefr
Fix Winmail.dat Attachment Issue – Exchange Online/Office 365 2026
Fix GuideTNEF FormatExchange Online

Fix Winmail.dat Attachment Issue – Exchange Online/Office 365 2026

Recipients receive Winmail.dat files instead of actual attachments when emails are sent from Exchange Online. This occurs due to TNEF format settings in remote domains configuration.

Emanuel DE ALMEIDAEmanuel DE ALMEIDA
March 17, 2026 12 min 4
TNEF FormatExchange Online 5 methods 12 min
Instant Solution

Navigate to Exchange Admin Center → Mail flowRemote domainsDefault → Edit → Set Use rich-text format to Never and change character sets to Unicode (UTF-8). This prevents TNEF encoding that creates Winmail.dat attachments.

Understanding the Winmail.dat Attachment Problem

The Winmail.dat attachment issue is a common problem in Exchange Online and Office 365 environments where recipients receive mysterious Winmail.dat files instead of the actual attachments sent from Outlook. This occurs because Exchange Online uses Transport Neutral Encapsulation Format (TNEF) by default, which packages rich text formatting and attachments in a proprietary Microsoft format that non-Exchange email systems cannot interpret.

When an Outlook user sends an email with rich text formatting or attachments to external recipients using Gmail, Yahoo, or other non-Microsoft email providers, the receiving system cannot decode the TNEF format. Instead, it creates a generic Winmail.dat file containing the encoded data, rendering the original attachment inaccessible to the recipient.

This issue typically surfaces after migrating to Office 365 or when organizations begin using Exchange Online for external communication. The problem affects business productivity and professional communication, as important documents become inaccessible to clients, partners, and vendors using different email platforms. Understanding and resolving this issue is crucial for maintaining effective external communication in modern business environments.

Related: How to Track Email Messages in Exchange Online Microsoft 365

Related: Exchange Online Outage Blocks Mailbox Access Worldwide

Related: Fix Microsoft 365 Domain Reputation Block – Exchange Online

Diagnostic

Symptoms

  • Recipients receive Winmail.dat files instead of actual PDF, Word, or Excel attachments
  • Some recipients see proper attachments while others see Winmail.dat
  • Non-Exchange email systems cannot open or display attachments correctly
  • Email formatting appears broken or missing for external recipients
  • Attachments show as generic Winmail.dat regardless of original file type
Analysis

Root Causes

  • Exchange Online uses Transport Neutral Encapsulation Format (TNEF) by default for rich text messages
  • Remote domain configuration set to allow rich text format for external recipients
  • Non-Microsoft email systems cannot interpret TNEF-encoded messages
  • Character set mismatch between sender and recipient email systems
  • Legacy Exchange settings carried over during Office 365 migration
  • Outlook client configured to send rich text format to internet recipients
Resolution Methods

Solutions

01

Configure Remote Domains in Exchange Admin Center

This method disables TNEF format through the Exchange Admin Center interface.

  1. Sign in to Microsoft 365 Admin Center with administrator credentials
  2. Navigate to Admin centersExchange
  3. In Exchange Admin Center, expand Mail flow in the left navigation
  4. Click on Remote domains
  5. Select Default from the remote domains list
  6. Click the Edit (pencil) icon
  7. Navigate to the Message format tab
  8. Under Use rich-text format, select Never
  9. Change Character set to Unicode (UTF-8)
  10. Change Non-MIME character set to Unicode (UTF-8)
  11. Click Save to apply changes
Pro tip: Changes may take up to 30 minutes to propagate across all Exchange Online servers.

Verification: Send a test email with an attachment to an external recipient. Confirm they receive the actual file instead of Winmail.dat.

02

Use Exchange Online PowerShell Commands

Configure remote domain settings using PowerShell for more precise control.

  1. Install the Exchange Online PowerShell module if not already installed:
    Install-Module -Name ExchangeOnlineManagement -Force
  2. Connect to Exchange Online PowerShell:
    Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com
  3. List current remote domains to verify configuration:
    Get-RemoteDomain | Format-Table -AutoSize Name, DomainName, TNEFEnabled
  4. Check the current TNEF settings for the default domain:
    Get-RemoteDomain -Identity "Default" | Select-Object Id, TNEFEnabled, CharacterSet, NonMimeCharacterSet
  5. Disable TNEF and set UTF-8 character encoding:
    Set-RemoteDomain -Identity "Default" -TNEFEnabled $false -CharacterSet utf-8 -NonMimeCharacterSet utf-8
  6. Verify the changes were applied:
    Get-RemoteDomain -Identity "Default" | Select-Object Id, TNEFEnabled, CharacterSet, NonMimeCharacterSet
  7. Disconnect from Exchange Online:
    Disconnect-ExchangeOnline
Warning: Ensure you have Exchange Administrator or Global Administrator permissions before running these commands.

Verification: The TNEFEnabled value should show as False and both character sets should display utf-8.

03

Configure Outlook Client Message Format Settings

Adjust individual Outlook client settings to prevent rich text format for internet recipients.

  1. Open Outlook desktop application
  2. Navigate to FileOptions
  3. Select Mail from the left sidebar
  4. Click Editor Options button
  5. In the Editor Options dialog, click Advanced
  6. Scroll down to International options
  7. Uncheck Automatically select encoding for outgoing messages
  8. Click OK to close Editor Options
  9. Back in Mail options, scroll to Message format section
  10. Set Compose messages in this format to HTML
  11. Click Internet Format button
  12. Select Convert to HTML format
  13. Set Encoding to Unicode (UTF-8)
  14. Click OK and then OK again to save settings
Pro tip: This method only affects the specific Outlook client and must be repeated for each user.

Verification: Create a new email to an external recipient, attach a file, and confirm the message format shows as HTML in the message options.

04

Create Specific Remote Domain Rules for Problem Recipients

Create targeted remote domain configurations for specific domains experiencing Winmail.dat issues.

  1. Connect to Exchange Online PowerShell:
    Connect-ExchangeOnline
  2. Identify the problematic recipient domain (e.g., gmail.com, yahoo.com)
  3. Create a new remote domain for the specific domain:
    New-RemoteDomain -Name "Gmail Domain" -DomainName "gmail.com"
  4. Configure the new remote domain to disable TNEF:
    Set-RemoteDomain -Identity "Gmail Domain" -TNEFEnabled $false -CharacterSet utf-8 -NonMimeCharacterSet utf-8
  5. Set additional formatting options:
    Set-RemoteDomain -Identity "Gmail Domain" -ContentType MimeHtmlText -LineWrapSize Unlimited
  6. Verify the new remote domain configuration:
    Get-RemoteDomain -Identity "Gmail Domain" | Format-List
  7. Repeat steps 3-6 for other problematic domains as needed
Pro tip: Specific domain rules take precedence over the default remote domain configuration.

Verification: Send test emails to recipients in the configured domains and confirm they receive proper attachments instead of Winmail.dat files.

05

Advanced Transport Rule Configuration

Create transport rules to force plain text or HTML format for external emails with attachments.

  1. In Exchange Admin Center, navigate to Mail flowRules
  2. Click Add a ruleCreate a new rule
  3. Name the rule: Prevent Winmail.dat for External Recipients
  4. Set condition: The recipient is locatedOutside the organization
  5. Add condition: The messagehas an attachment
  6. Set action: Modify the message propertiesSet the message format to HTML
  7. Add action: Set message header with:
    • Header name: Content-Type
    • Header value: text/html; charset=utf-8
  8. Set rule priority to 0 (highest priority)
  9. Enable the rule and click Save
  10. Alternative PowerShell approach:
    New-TransportRule -Name "Block TNEF External" -SentToScope NotInOrganization -HasAttachment $true -SetHeaderName "X-MS-Exchange-Organization-DisableTnef" -SetHeaderValue "true"
Warning: Transport rules affect all outbound email and may impact message formatting. Test thoroughly before implementing.

Verification: Monitor mail flow using Get-MessageTrace to confirm the rule is applied to external emails with attachments.

Validation

Verification

To confirm the Winmail.dat issue is resolved, perform these verification steps:

  1. Send a test email with a PDF attachment to an external Gmail or Yahoo account
  2. Ask the recipient to confirm they receive the actual PDF file, not a Winmail.dat attachment
  3. Check the message headers using PowerShell:
    Get-MessageTrace -SenderAddress sender@yourdomain.com -RecipientAddress external@gmail.com -StartDate (Get-Date).AddHours(-1)
  4. Verify remote domain settings show TNEFEnabled as False:
    Get-RemoteDomain | Where-Object {$_.TNEFEnabled -eq $false}
  5. Test with multiple external email providers to ensure consistent behavior
Pro tip: Keep a test external email account specifically for verifying attachment delivery issues.
If it still fails

Advanced Troubleshooting

If the above methods didn't resolve the Winmail.dat issue, try these advanced troubleshooting steps:

  • Check Outlook client version: Ensure all users have updated Outlook clients. Legacy versions may override server settings.
  • Verify Exchange Online plan: Some advanced mail flow features require specific Exchange Online plans.
  • Review third-party add-ins: Disable Outlook add-ins that might interfere with message formatting.
  • Check hybrid configuration: In hybrid environments, verify on-premises Exchange settings don't conflict with cloud settings.
  • Monitor message trace logs: Use Get-MessageTrace with detailed tracking to identify where TNEF encoding occurs.
  • Contact Microsoft Support: If the issue persists after trying all methods, open a support case with Microsoft 365 support team.

For persistent issues, consider implementing a gradual rollout by creating specific remote domain rules for problematic recipient domains before applying global changes.

Frequently Asked Questions

What exactly is a Winmail.dat file and why does it appear?+
Winmail.dat is a file created when Microsoft Exchange or Outlook sends emails using Transport Neutral Encapsulation Format (TNEF). This proprietary Microsoft format packages rich text formatting, attachments, and other message properties into a single file. When non-Microsoft email systems receive these messages, they cannot decode the TNEF format and instead display it as an attachment named Winmail.dat. The file contains the original attachment and formatting information, but recipients using Gmail, Yahoo, Apple Mail, or other non-Exchange systems cannot access the content without special tools.
Will disabling TNEF affect internal email formatting within my organization?+
No, disabling TNEF for remote domains only affects emails sent to external recipients outside your organization. Internal emails between users in the same Exchange Online tenant will continue to support rich text formatting, calendar invitations, voting buttons, and other advanced Outlook features. The remote domain settings specifically target external communication while preserving full functionality for internal collaboration. Your users will still enjoy all Outlook features when communicating with colleagues within the organization.
How long does it take for remote domain changes to take effect?+
Remote domain configuration changes in Exchange Online typically propagate within 15-30 minutes across all servers. However, in some cases, it may take up to 2 hours for changes to fully replicate across all Exchange Online datacenters globally. During this propagation period, some emails may still be sent with TNEF encoding while others use the new settings. It's recommended to wait at least 30 minutes after making changes before testing, and to perform multiple tests over a few hours to ensure consistent behavior.
Can I configure different settings for specific external domains?+
Yes, you can create specific remote domain configurations for individual external domains or domain groups. This allows you to maintain TNEF for some external partners who use Exchange while disabling it for others. Use the New-RemoteDomain PowerShell cmdlet to create domain-specific rules, such as separate configurations for gmail.com, yahoo.com, or partner organizations. Specific domain rules take precedence over the default remote domain settings, giving you granular control over message formatting based on the recipient's email provider.
What should I do if recipients still receive Winmail.dat files after applying these fixes?+
If Winmail.dat files persist after configuration changes, first verify the settings took effect using Get-RemoteDomain PowerShell commands. Check that TNEFEnabled shows as False and character sets are set to utf-8. Clear Outlook's autocomplete cache and restart the application, as cached recipient properties might override server settings. Test from different Outlook clients (desktop, web, mobile) to isolate client-specific issues. If problems continue, create transport rules to force HTML formatting for external emails, or contact Microsoft Support for advanced troubleshooting of your specific Exchange Online configuration.
Emanuel DE ALMEIDA
Written by

Emanuel DE ALMEIDA

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...