imap_fetchstructure
(PHP 4, PHP 5)
imap_fetchstructure — 특별한 메시지의 구조체를 읽어온다
Description
object imap_fetchstructure
( int $imap_stream
, int $msg_number
[, int $flags
] )
이 함수는 주어진 메시지의 구조화된 모든 정보를 페치한다. 선택적 인수flags 는 오직 하나의 옵션만 있다. 즉, msg_number 를 UID 로 취급할것인지 함수에게 알려주는 FT_UID 의 옵션만 있다. 리턴된 객체는 envelope, internal date, size, flags와 각 mime첨부파일과 비슷한 객체를 갖는 본문 구조체이다. 리턴되는 객체의 구조는 다음과 같다:
type | Primary body type |
encoding | Body transfer encoding |
ifsubtype | TRUE if there is a subtype string |
subtype | MIME subtype |
ifdescription | TRUE if there is a description string |
description | Content description string |
ifid | TRUE if there is an identification string |
id | Identification string |
lines | Number of lines |
bytes | Number of bytes |
ifdisposition | TRUE if there is a disposition string |
disposition | Disposition string |
ifdparameters | TRUE if the dparameters array exists |
dparameters | Disposition parameter array |
ifparameters | TRUE if the parameters array exists |
parameters | MIME parameters array |
parts | Array of objects describing each message part |
Note:
dparameters is an array of objects where each object has an "attribute" and a "value" property.
Parameter is an array of objects where each object has an "attributte" and a "value" property.
Parts is an array of objects identical in structure to the top-level object, with the limitation that it cannot contain further 'parts' objects.
0 | text |
1 | multipart |
2 | message |
3 | application |
4 | audio |
5 | image |
6 | video |
7 | other |
0 | 7BIT |
1 | 8BIT |
2 | BINARY |
3 | BASE64 |
4 | QUOTED-PRINTABLE |
5 | OTHER |