Files
playbook/skills/tsl-api-reference/references/codegen/builtin/object/messagepart.md
T
csh 9010829c6d feat(tsl-api-reference): expand and reorganize api catalog
Flatten builtin pages, add third-party and platform scopes, and import financial and data warehouse references.

Keep the existing generated index without rebuilding after signature normalization.
2026-08-10 18:26:24 +08:00

266 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Object - MessagePart 邮件分段
## `MessagePart`
声明:class
MessagePart 内置对象
### `create()`
声明:function
创建 MessagePart 实例
可见性:public
### `loadFromFile(alias, file_name)`
声明:function
从文件中打开邮件消息部分,仅对附件型有效
可见性:public
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `alias` | string | 可选。字符串类型,目录别名。可省略 |
| `file_name` | string | 字符串类型,文件名 |
返回:any
### `loadFromStream(stream)`
声明:function
从流中打开邮件消息部分,仅对附件型有效
可见性:public
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `stream` | TStream | 流对象类型 |
返回:any
### `saveToFile(alias, file_name)`
声明:function
保存到文件中,仅对附件型有效
可见性:public
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `alias` | string | 可选。字符串类型,目录别名。可省略 |
| `file_name` | string | 字符串类型,文件名 |
返回:any
### `saveToStream(stream)`
声明:function
保存到流中,仅对附件型有效
可见性:public
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `stream` | TStream | 流对象类型 |
返回:any
### `AsBinary`
声明:property
内容以二进制类型的原始值
可见性:public
类型:binary
访问:read/write
### `AsString`
声明:property
内容以字符串方式的原始值
可见性:public
类型:string
访问:read/write
### `Body`
声明:property
主体内容,仅对文本类型有效
可见性:public
类型:string
访问:read/write
### `CharSet`
声明:property
消息的默认编码格式
可见性:public
类型:string
访问:read/write
### `ContentDescription`
声明:property
内容描述
可见性:public
类型:string
访问:read/write
### `ContentID`
声明:property
内容ID
可见性:public
类型:string
访问:read/write
### `ContentLocation`
声明:property
内容的位置URL
可见性:public
类型:string
访问:read/write
### `ContentTransfer`
声明:property
读写类型,消息内容传输时的编码类型,主要编码方式有。 7bit – 7位不编码的ASCII码,默认编码方式。 8bit – 8位不编码的原始值。 binary – 不编码的10进制数据流。 quoted-printable 转换为7位可打印的ASCII编码方式。每个高位为1的码翻译为如=A1的16进制模式。 base64 – Base64模式,一种将8字节转换为7字节的编码方式
可见性:public
类型:string
访问:read/write
### `ContentType`
声明:property
读写类型,消息内容类型,常见类型种类如下 text/plain text/html text/xml text/enhanced image/jpeg image/gif audio/basic audio/au video/mpeg application/octet-stream application/postscript application/ms-word application/ms-excel application/rtf multipart/mixed multipart/alternative multipart/parallel multipart/related message/rfc822 message/external-body
可见性:public
类型:string
访问:read/write
### `ExtraHeaders`
声明:property
邮件的附加头信息
可见性:public
类型:string
访问:read/write
### `FileName`
声明:property
文件名,仅对附件类型有效
可见性:public
类型:string
访问:read/write
### `Headers`
声明:property
消息头部信息
可见性:public
类型:string
访问:read/write
### `IsEncoded`
声明:property
是否编码
可见性:public
类型:boolean
访问:read/write
### `MsgID`
声明:property
消息ID
可见性:public
类型:string
访问:read/write
### `ParentPart`
声明:property
内容在MailMsg的索引
可见性:public
类型:integer
访问:read
### `PartType`
声明:property
消息部分的类型,0:文本类型,1:附件类型
可见性:public
类型:integer
访问:read