imap_fetchstructure
获取某信件的结构信息。
语法: array imap_fetchstructure(int imap_stream, int msg_number);
返回值: 数组
函数种类: 网络系统
本函数可读取指定信件的相关信息。参数 imap_stream 为 IMAP 的代号。参数 msg_number 为信件的序号。返回的信息为数组的方式,各元素的内容见下表
| 元素名称 | 类型 |
| type | 整数 (Integer) |
| encoding | 整数 (Integer) |
| ifsubtype | 布尔 (Boolean) |
| subtype | 字符串 (String) |
| ifdescription | 布尔 (Boolean) |
| description | 字符串 (String) |
| ifid | 布尔 (Boolean) |
| id | 字符串 (String) |
| lines | 整数 (Integer) |
| bytes | 整数 (Integer) |
| ifparameters | 布尔 (Boolean) |
其中 type 元素的值代表的意义如下
| 值 | 代表意义 |
| 0 | 文字 text |
| 1 | 复合 multipart |
| 2 | 信息 message |
| 3 | 程序 application |
| 4 | 声音 audio |
| 5 | 图形 image |
| 6 | 影像 video |
| 7 | 其它 other |
而 encoding 值代表的意义如下
| 值 | 代表意义 |
| 0 | 七位 (7 bit) |
| 1 | 八位 (8 bit) |
| 2 | 二进位 (binary) |
| 3 | BASE64 编码 |
| 4 | QP 编码 (QuotedPrintable) |
| 5 | 其它 |
|