imap_fetchstructure

(PHP 3, PHP 4 )

imap_fetchstructure --  특별한 메시지의 구조체를 읽어온다

Description

object imap_fetchstructure ( int imap_stream, int msg_number [, int flags])

이 함수는 주어진 메시지의 구조화된 모든 정보를 페치한다. 선택적 인수flags는 오직 하나의 옵션만 있다. 즉, msg_numberUID로 취급할것인지 함수에게 알려주는 FT_UID의 옵션만 있다. 리턴된 객체는 envelope, internal date, size, flags와 각 mime첨부파일과 비슷한 객체를 갖는 본문 구조체이다. 리턴되는 객체의 구조는 다음과 같다:

표 1. imap_fetchstructure()에 의해 리턴되는 객체

typePrimary body type
encodingBody transfer encoding
ifsubtypeTRUE if there is a subtype string
subtypeMIME subtype
ifdescriptionTRUE if there is a description string
descriptionContent description string
ifidTRUE if there is an identification string
idIdentification string
linesNumber of lines
bytesNumber of bytes
ifdispositionTRUE if there is a disposition string
dispositionDisposition string
ifdparametersTRUE if the dparameters array exists
dparametersDisposition parameter array
ifparametersTRUE if the parameters array exists
parametersMIME parameters array
partsArray of objects describing each message part

  1. dparameters is an array of objects where each object has an "attribute" and a "value" property.

  2. Parameter is an array of objects where each object has an "attributte" and a "value" property.

  3. Parts is an array of objects identical in structure to the top-level object, with the limitation that it cannot contain further 'parts' objects.

표 2. Primary body type

0text
1multipart
2message
3application
4audio
5image
6video
7other

표 3. Transfer encodings

07BIT
18BIT
2BINARY
3BASE64
4QUOTED-PRINTABLE
5OTHER