imap_fetchstructure
(PHP 4, PHP 5, PHP 7)
imap_fetchstructure — 特定のメッセージの構造を読み込む
説明
imap_fetchstructure
( resource $imap_stream
, int $msg_number
[, int $options
= 0
] ) : object|false
この関数は、指定したメッセージに関するすべての構造化された情報を取り出します。
パラメータ
imap_stream
- imap_open() が返す IMAP ストリーム。
msg_number
- メッセージ番号。
options
- オプションのパラメータで、
FT_UID
のみが指定可能です。 これは、msg_number
をUID
として処理することを関数に指定するためのものです。
返り値
以下の表に示すプロパティを持つオブジェクトを返します。
失敗した場合に false
を返します
type | 最初の body 部の型 |
encoding | body 部を転送する際のエンコード法 |
ifsubtype | subtype 文字列がある場合に true
|
subtype | MIME の subtype |
ifdescription | description 文字列がある場合に true
|
description | 内容を記述する文字列 |
ifid | identification 文字列がある場合に true
|
id | Identification 文字列 |
lines | 行数 |
bytes | バイト数 |
ifdisposition | disposition 文字列がある場合に true
|
disposition | Disposition 文字列 |
ifdparameters | dparameters 配列が存在する場合に true
|
dparameters | オブジェクトの配列。各オブジェクトは "attribute"
および |
ifparameters | 配列 parameters が存在する場合に true
|
parameters | オブジェクトの配列。各オブジェクトは "attribute"
および |
parts | オブジェクトの配列であり、その構造はトップレベルオブジェクトと
同じです。それぞれが MIME body 部に対応しています。 |
値 | 型 | 定数 |
---|---|---|
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 |
値 | 型 | 定数 |
---|---|---|
0 | 7bit | ENC7BIT |
1 | 8bit | ENC8BIT |
2 | Binary | ENCBINARY |
3 | Base64 | ENCBASE64 |
4 | Quoted-Printable | ENCQUOTEDPRINTABLE |
5 | other | ENCOTHER |