Forum und email

imap_fetchstructure

(PHP 4, PHP 5)

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첨부파일과 비슷한 객체를 갖는 본문 구조체이다. 리턴되는 객체의 구조는 다음과 같다:

imap_fetchstructure()에 의해 리턴되는 객체
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:

  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.

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

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