IMAP, POP3 및 NNTP imap_fetchstructure
(PHP 4, PHP 5, PHP 7, PHP 8)
imap_fetchstructure — 특정 메시지의 구조 읽기
설명
imap_fetchstructure(IMAP\Connection $imap
, int $message_num
, int $flags
= 0): stdClass|false
주어진 메시지에 대한 모든 구조화된 정보를 가져옵니다.
매개변수
imap
- IMAP\Connection 인스턴스입니다.
message_num
- 메시지 번호
flags
- 이 선택적 매개변수에는
message_num
인수를 UID로 처리하도록 함수에 지시하는FT_UID
라는 단일 옵션만 있습니다.
반환 값
아래 표에 나열된 속성을 가진 개체를 반환하거나 실패 시 false
를 반환합니다.
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 | An array of objects where each object has an
"attribute" and a "value"
property corresponding to the parameters on the
Content-disposition MIME
header. |
ifparameters | true if the parameters array exists |
parameters | An array of objects where each object has an
"attribute" and a "value"
property. |
parts | An array of objects identical in structure to the top-level object, each of which corresponds to a MIME body part. |
기본 바디 유형(사용된 라이브러리에 따라 값이 다를 수 있으며 상수 사용 권장)
Value | Type | Constant |
---|---|---|
0 | text | TYPETEXT |
1 | multipart | TYPEMULTIPART |
2 | message | TYPEMESSAGE |
3 | application | TYPEAPPLICATION |
4 | audio | TYPEAUDIO |
5 | image | TYPEIMAGE |
6 | video | TYPEVIDEO |
7 | model | TYPEMODEL |
8 | other | TYPEOTHER |
인코딩 전송(사용된 라이브러리에 따라 값이 다를 수 있으며 상수 사용 권장)
Value | Type | Constant |
---|---|---|
0 | 7bit | ENC7BIT |
1 | 8bit | ENC8BIT |
2 | Binary | ENCBINARY |
3 | Base64 | ENCBASE64 |
4 | Quoted-Printable | ENCQUOTEDPRINTABLE |
5 | other | ENCOTHER |
변경 로그
버전 | 설명 |
---|---|
8.1.0 | imap 매개변수는 이제 IMAP\Connection 인스턴스를 필요로 합니다. 이전에는 리소스가 필요했습니다. |
기타
- imap_fetchbody() - 메시지 본문의 특정 섹션 가져오기
- imap_bodystruct() - 특정 메시지의 지정된 본문 섹션의 구조를 읽습니다.