Forum und email

imap_body

(PHP 4, PHP 5)

imap_body — 메시지의 본문을 읽어온다

Description

string imap_body ( int $imap_stream , int $msg_number [, int $flags ] )

imap_body() returns the body of the message, numbered msg_number in the current mailbox. The optional flags are a bit mask with one or more of the following: imap_body()함수는 메시지의 본문을 리턴한다. 즉, 현재메일박스의 msg_number 번째의 메시지 의 본문을 읽어 오게 된다. 선택적 인수 flags 는 다음 리스트의 비트마스크 가 된다:

  • FT_UID - The msgno is a UID
  • FT_PEEK - Do not set the \Seen flag if not already set
  • FT_INTERNAL - The return string is in internal format, will not canonicalize to CRLF.

imap_body()함수는 메시지 본문을 완전히 복사해 올 것이다. multipart MIME-encoded 메시지의 한 부분을 뽑아내기 위해서는 본문의 구조를 분석하는 imap_fetchstructure()함수와 한개의 본문 구성요소의 복사물을 뽑아오는 imap_fetchbody()함수를 이용해야 한다.