MapiAttachment
Overview
MapiAttachment 是一个类在Aspose.Email FOSS的.NET中.
MapiAttachment.FromBytes creates an attachment from a filename, byte array, optional MIME type and content ID.
Description
MapiAttachment 是一个类在Aspose.Email FOSS库的NET,它暴露了4个方法和8个属性用于编程.
课程还提供了 Properties 财产 (提供与关押相关的 mapi属性集合), IsEmbeddedMessage 附录文件的内容 (指附件是否包含嵌入式消息), IsStorageAttachment 特性 (说明附件是否是存储设备).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Filename | string? | 阅读/写作 | 获取或设置附件的文件名 |
Data | byte[] | 阅读/写作 | 获取或设置附件的原始字节内容 |
MimeType | string? | 阅读/写作 | 获取或设置附件的MIME类型 |
ContentId | string? | 阅读/写作 | 获取或设置内链附件的内容标识符 |
EmbeddedMessage | MapiMessage? | 阅读/写作 | 如果附件是消息,则获取或设置嵌入式 MapiMessage |
Properties | MapiPropertyCollection | Read | 提供与附件相关的MAPI属性集合. |
IsEmbeddedMessage | bool | Read | 表示附件是否包含嵌入式消息. |
IsStorageAttachment | bool | Read | 表示附件是否是存储 (OLE) 附加件. |
Methods
| Signature | Description |
|---|---|
FromBytes(filename: string, data: byte[], mimeType: string?, contentId: string?) | 从文件名,字节阵列,可选的MIME类型和内容ID创建附件 |
FromStream(filename: string, stream: Stream, mimeType: string?, contentId: string?) | |
LoadData(stream: Stream) | 从给定的流中加载附件二进制数据到附件中 |
OpenRead() | 返回附件数据的可读流 |