Tnef Ole Object Converter Class
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public abstract class TnefOleObjectConverter- Inheritance
- Object TnefOleObjectConverter
Remarks
A TnefOleObjectConverter is used by ConvertToMime(TnefConversionOptions, CancellationToken) (see OleObjectConverter) for each attachment whose Method is Ole: an OLE object, such as a picture or a document that was embedded into the body of a Rich Text Format (RTF) message. The content of such an attachment is an OLE compound file (see OpenRead), which few applications other than Microsoft Outlook can display. [MS-OXCMAIL] section 2.1.3.4.4 recommends that the attachment be converted to an image instead.
The converter returns a stream containing a PNG, JPEG, GIF, BMP or WebP image that depicts the object, or if it cannot render the object. The stream is read from its current position to its end, so it does not need to be seekable, and it is disposed once it has been read. The image replaces the content of the attachment, and its Content-Type is determined from the image data rather than from the attachment's properties. If the stream does not contain an image in one of those formats, the OLE compound file is used as the content instead.
When the message body is generated from RTF, an image that replaces an attachment's content is also displayed in the HTML body at the position of the attachment.
Constructors
| TnefOleObjectConverter | Initialize a new instance of the TnefOleObjectConverter class. |
Methods
| Convert | Render an OLE object attachment as an image. |
| ConvertAsync | Asynchronously render an OLE object attachment as an image. |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |