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 | 其它 |
|