Navigate to Exchange Admin Center → Mail flow → Remote domains → Default → 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.

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.
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
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
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
Solutions
Configure Remote Domains in Exchange Admin Center
This method disables TNEF format through the Exchange Admin Center interface.
- Sign in to Microsoft 365 Admin Center with administrator credentials
- Navigate to Admin centers → Exchange
- In Exchange Admin Center, expand Mail flow in the left navigation
- Click on Remote domains
- Select Default from the remote domains list
- Click the Edit (pencil) icon
- Navigate to the Message format tab
- Under Use rich-text format, select Never
- Change Character set to Unicode (UTF-8)
- Change Non-MIME character set to Unicode (UTF-8)
- Click Save to apply changes
Verification: Send a test email with an attachment to an external recipient. Confirm they receive the actual file instead of Winmail.dat.
Use Exchange Online PowerShell Commands
Configure remote domain settings using PowerShell for more precise control.
- Install the Exchange Online PowerShell module if not already installed:
Install-Module -Name ExchangeOnlineManagement -Force - Connect to Exchange Online PowerShell:
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com - List current remote domains to verify configuration:
Get-RemoteDomain | Format-Table -AutoSize Name, DomainName, TNEFEnabled - Check the current TNEF settings for the default domain:
Get-RemoteDomain -Identity "Default" | Select-Object Id, TNEFEnabled, CharacterSet, NonMimeCharacterSet - Disable TNEF and set UTF-8 character encoding:
Set-RemoteDomain -Identity "Default" -TNEFEnabled $false -CharacterSet utf-8 -NonMimeCharacterSet utf-8 - Verify the changes were applied:
Get-RemoteDomain -Identity "Default" | Select-Object Id, TNEFEnabled, CharacterSet, NonMimeCharacterSet - Disconnect from Exchange Online:
Disconnect-ExchangeOnline
Verification: The TNEFEnabled value should show as False and both character sets should display utf-8.
Configure Outlook Client Message Format Settings
Adjust individual Outlook client settings to prevent rich text format for internet recipients.
- Open Outlook desktop application
- Navigate to File → Options
- Select Mail from the left sidebar
- Click Editor Options button
- In the Editor Options dialog, click Advanced
- Scroll down to International options
- Uncheck Automatically select encoding for outgoing messages
- Click OK to close Editor Options
- Back in Mail options, scroll to Message format section
- Set Compose messages in this format to HTML
- Click Internet Format button
- Select Convert to HTML format
- Set Encoding to Unicode (UTF-8)
- Click OK and then OK again to save settings
Verification: Create a new email to an external recipient, attach a file, and confirm the message format shows as HTML in the message options.
Create Specific Remote Domain Rules for Problem Recipients
Create targeted remote domain configurations for specific domains experiencing Winmail.dat issues.
- Connect to Exchange Online PowerShell:
Connect-ExchangeOnline - Identify the problematic recipient domain (e.g., gmail.com, yahoo.com)
- Create a new remote domain for the specific domain:
New-RemoteDomain -Name "Gmail Domain" -DomainName "gmail.com" - Configure the new remote domain to disable TNEF:
Set-RemoteDomain -Identity "Gmail Domain" -TNEFEnabled $false -CharacterSet utf-8 -NonMimeCharacterSet utf-8 - Set additional formatting options:
Set-RemoteDomain -Identity "Gmail Domain" -ContentType MimeHtmlText -LineWrapSize Unlimited - Verify the new remote domain configuration:
Get-RemoteDomain -Identity "Gmail Domain" | Format-List - Repeat steps 3-6 for other problematic domains as needed
Verification: Send test emails to recipients in the configured domains and confirm they receive proper attachments instead of Winmail.dat files.
Advanced Transport Rule Configuration
Create transport rules to force plain text or HTML format for external emails with attachments.
- In Exchange Admin Center, navigate to Mail flow → Rules
- Click Add a rule → Create a new rule
- Name the rule: Prevent Winmail.dat for External Recipients
- Set condition: The recipient is located → Outside the organization
- Add condition: The message → has an attachment
- Set action: Modify the message properties → Set the message format to HTML
- Add action: Set message header with:
- Header name:
Content-Type - Header value:
text/html; charset=utf-8
- Header name:
- Set rule priority to 0 (highest priority)
- Enable the rule and click Save
- Alternative PowerShell approach:
New-TransportRule -Name "Block TNEF External" -SentToScope NotInOrganization -HasAttachment $true -SetHeaderName "X-MS-Exchange-Organization-DisableTnef" -SetHeaderValue "true"
Verification: Monitor mail flow using Get-MessageTrace to confirm the rule is applied to external emails with attachments.
Verification
To confirm the Winmail.dat issue is resolved, perform these verification steps:
- Send a test email with a PDF attachment to an external Gmail or Yahoo account
- Ask the recipient to confirm they receive the actual PDF file, not a Winmail.dat attachment
- Check the message headers using PowerShell:
Get-MessageTrace -SenderAddress sender@yourdomain.com -RecipientAddress external@gmail.com -StartDate (Get-Date).AddHours(-1) - Verify remote domain settings show TNEFEnabled as False:
Get-RemoteDomain | Where-Object {$_.TNEFEnabled -eq $false} - Test with multiple external email providers to ensure consistent behavior
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-MessageTracewith 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?+
Will disabling TNEF affect internal email formatting within my organization?+
How long does it take for remote domain changes to take effect?+
Can I configure different settings for specific external domains?+
What should I do if recipients still receive Winmail.dat files after applying these fixes?+
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.
Further Intelligence
Deepen your knowledge with related resources
Discussion
Share your thoughts and insights
You must be logged in to comment.


