问题
I develop an outlook add-in using Visual studio 2013 and Add-in express v.7.7.4087. I have to deal with multiple email accounts (stores). Please see following snapshot
When I am sending a mail (via outlook) using this Gmail account to a some other Gmail recipient, I can see a attached file named "winmail.dat". But I can't see that file after sending it to Exchange Email recipients. Nevertheless, with Gmail recipients, I can't see that attachment in the mail item which is in outlook sent box.
The same mail I sent it using this exchange account (via outlook). But it never attach any "winmail.dat" file to Exchange recipients or Gmail recipients
Not only that, every time when I see this "winmail.dat", I noticed that outlook replace the text of link with own "href" (so, the user can see only the href not the text I put for that URL) which I never experienced with exchange
What I need?
- Please explain the contradiction.
Is there any cure for this?
a. Prevent attaching "winmail.dat" to the email
b. Avoid HTML link text to be replaced by own "href"
What I have done? and elaborations
The purpose of my plugin is wrapping some URLs in the mail with guids. So, I modify the mail item's HTML body before sending it. I am adding some user properties too (just for manipulating mail item as per my business logics). But I remove all the user properties before sending (inside itemSend event).
I followed the same test after setting the outlook mail body as plain text (using outlook settings), still no luck.
回答1:
When an end user sends mail to the Internet from an Exchange Windows or Outlook client, a file attachment called Winmail.dat may be automatically added to the end of the message if the recipient's client cannot receive messages in Rich Text Format (RTF). The Winmail.dat file contains Exchange Server RTF information for the message, and may appear to the recipient as a binary file. Read more about that in the following articles:
- How to Prevent the Winmail.dat File from Being Sent to Internet Users
- Email received from a sender using Outlook includes a Winmail.dat attachment
Note, if you set any user properties, Outlook will try to preserve them by sendign the mesage in the TNEF format. You can delete all user properties from the outgoing item and set a special Extended MAPI property which can prevent Outlook from using the TNEF format.
You may find the Forcing Plain Text With MAPI article helpful.
来源:https://stackoverflow.com/questions/32900976/prevent-winmail-dat-in-outlook-for-gmail-accounts