How to fix attachments being sent as WinMail.dat

Share on linkedin
LinkedIn
Share on twitter
Twitter
Share on facebook
Facebook

Have you been advised by the person you emailed that your attachment came through as WinMail.dat instead of the PDF attachment you actually sent. So what happened?

This sometimes occurs when Outlook sends emails out which contains some Rich Text Format (RTF) content.   Even if you set Outlook to send email as HTML format, some content is RTF and this is confusing Microsoft365’s Exchange server. One common cause is a signature that was created in Word and copied into Outlook. The RTF content causing the issue is usually the email signature ( created in Word and copied into Outlook).

Stop Outlook Sending Attachments as WinMail.dat

This is how you would fix the issue for everyone on Microsoft Office 365:

  1. Login into Microsoft Office 365 via PowerShell.
  2. Run PowerShell as admin
  3. Enter the command $UserCredential = Get-Credential
  4. Enter the requested login details when prompted
  5. Enter Set-ExecutionPolicy Unrestricted
    Fixing Winmail.dat issue for Outlook via Powershell
  6. Press [Y] for Yes or [A] Yes to All
  7. Enter $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  8. Enter Import-PSSession $Session
  9. Enter Set-RemoteDomain Default -TNEFEnabled $false
  10. You can check if the setting has been applied by typing in the command get-RemoteDomain | fl *
  11. You should see TNEFEnabled as False
And that should be it. All outgoing mail for either the user or users you changed the setting for, should now have their mail forced into HTML (or plain text) and not RTF.
 


Want to stay up to date with useful tech-tips?  

Follow us on LinkedIn, Facebook or Twitter to be notified when we post new content. Or, even better, scroll down to the very bottom of this page to sign up for our Newsletter. We only send them once a month and you can always unsubscribe.