함수 레퍼런스
PHP Manual

IMAP, POP3, NNTP 함수

소개

이 함수는 IMAP, NNTP, POP3 프로토콜로 작업을 할 수 있게 해 주고, 로컬 편지함에 접근하는 방법을 제공합니다.

몇몇 IMAP 함수는 POP 프로토콜과 정상적으로 작동하지 않습니다.

요구 조건

이 확장은 c-client 라이브러리가 설치되어 있어야 합니다. » ftp://ftp.cac.washington.edu/imap/에서 최신 버전을 받아서 컴파일 하십시오.

IMAP 소스 파일을 시스템 include 디렉토리에 직접 복사하면 안됩니다. 충돌이 생길 수도 있습니다. 대신, 시스템 include 디렉토리 밑에 /usr/local/imap-2000b/(위치와 이름은 설정과 IMAP 버전에 따라 다릅니다)처럼 새로운 디렉토리를 만들고, 새 디렉토리 안에 추가적으로 lib/, include/ 디렉토리를 만듭니다. IMAP 소스 트리의 c-client 디렉토리에서 모든 *.h 파일을 include/에 복사하고, 모든 *.c 파일을 lib/에 복사합니다. 추가적으로, IMAP을 컴파일 할 때 c-client.a가 만들어집니다. 이 파일을 libc-client.a로 이름을 바꾸어 lib/ 디렉토리에 넣으십시오.

Note: c-client 라이브러리에 SSL이나 Kerberos 지원을 추가하여 빌드하려면 패키지 안에 있는 문서를 읽어보십시오.

Note: 맨드레이크 리눅스에서, IMAP 라이브러리(libc-client.a)는 Kerberos 지원을 하지 않습니다. SSL을 지원하는 다른 버전(client-PHP4.a)이 설치됩니다. 라이브러리는 Kerberos를 지원하도록 다시 컴파일해야 합니다.

설치

To get these functions to work, you have to compile PHP with --with-imap[=DIR], where DIR is the c-client install prefix. From our example above, you would use --with-imap=/usr/local/imap-2000b. This location depends on where you created this directory according to the description above. Windows users may include the php_imap.dll DLL in php.ini. IMAP is not supported on systems earlier that Windows 2000. This is because it uses encryption functions in order to enable SSL connections to the mail servers.

Note: Depending how the c-client was configured, you might also need to add --with-imap-ssl=/path/to/openssl/ and/or --with-kerberos=/path/to/kerberos into the PHP configure line.

Warning

IMAP, recode, YAZ, Cyrus 확장은 같은 내부 심볼을 공유하기 때문에, 동시에 사용할 수 없습니다.

실행시 설정

이 확장은 php.ini 설정이 존재하지 않습니다.

실행시 설정

예약 상수

이 확장은 다음의 상수들을 정의합니다. 이 확장을 PHP에 내장했거나, 실행시에 동적으로 읽어들일 경우에만 사용할 수 있습니다.

NIL (integer)
OP_DEBUG (integer)
OP_READONLY (integer)
Open mailbox read-only
OP_ANONYMOUS (integer)
Don't use or update a .newsrc for news (NNTP only)
OP_SHORTCACHE (integer)
OP_SILENT (integer)
OP_PROTOTYPE (integer)
OP_HALFOPEN (integer)
For IMAP and NNTP names, open a connection but don't open a mailbox.
OP_EXPUNGE (integer)
OP_SECURE (integer)
CL_EXPUNGE (integer)
silently expunge the mailbox before closing when calling imap_close()
FT_UID (integer)
The parameter is a UID
FT_PEEK (integer)
Do not set the \Seen flag if not already set
FT_NOT (integer)
FT_INTERNAL (integer)
The return string is in internal format, will not canonicalize to CRLF.
FT_PREFETCHTEXT (integer)
ST_UID (integer)
The sequence argument contains UIDs instead of sequence numbers
ST_SILENT (integer)
ST_SET (integer)
CP_UID (integer)
the sequence numbers contain UIDS
CP_MOVE (integer)
Delete the messages from the current mailbox after copying with imap_mail_copy()
SE_UID (integer)
Return UIDs instead of sequence numbers
SE_FREE (integer)
SE_NOPREFETCH (integer)
Don't prefetch searched messages
SO_FREE (integer)
SO_NOSERVER (integer)
SA_MESSAGES (integer)
SA_RECENT (integer)
SA_UNSEEN (integer)
SA_UIDNEXT (integer)
SA_UIDVALIDITY (integer)
SA_ALL (integer)
LATT_NOINFERIORS (integer)
This mailbox has no "children" (there are no mailboxes below this one).
LATT_NOSELECT (integer)
This is only a container, not a mailbox - you cannot open it.
LATT_MARKED (integer)
This mailbox is marked. Only used by UW-IMAPD.
LATT_UNMARKED (integer)
This mailbox is not marked. Only used by UW-IMAPD.
SORTDATE (integer)
Sort criteria for imap_sort(): message Date
SORTARRIVAL (integer)
Sort criteria for imap_sort(): arrival date
SORTFROM (integer)
Sort criteria for imap_sort(): mailbox in first From address
SORTSUBJECT (integer)
Sort criteria for imap_sort(): message subject
SORTTO (integer)
Sort criteria for imap_sort(): mailbox in first To address
SORTCC (integer)
Sort criteria for imap_sort(): mailbox in first cc address
SORTSIZE (integer)
Sort criteria for imap_sort(): size of message in octets
TYPETEXT (integer)
TYPEMULTIPART (integer)
TYPEMESSAGE (integer)
TYPEAPPLICATION (integer)
TYPEAUDIO (integer)
TYPEIMAGE (integer)
TYPEVIDEO (integer)
TYPEOTHER (integer)
ENC7BIT (integer)
ENC8BIT (integer)
ENCBINARY (integer)
ENCBASE64 (integer)
ENCQUOTEDPRINTABLE (integer)
ENCOTHER (integer)
IMAP_OPENTIMEOUT (integer)
IMAP_READTIMEOUT (integer)
IMAP_WRITETIMEOUT (integer)
IMAP_CLOSETIMEOUT (integer)
LATT_REFERRAL (integer)
LATT_HASCHILDREN (integer)
LATT_HASNOCHILDREN (integer)
TYPEMODEL (integer)

참고

이 문서는 제공하는 함수에 관련한 모든 상세를 설명할 수 없습니다. 자세한 정보는 c-client 라이브러리 소스에 제공되는 문서(docs/internal.txt)에서 제공합니다. 그리고 다음 RFC 문서를 참고하십시오:

더 자세한 사항은 David Wood가 저술한 » Programming Internet Email 과 Dianna Mullet와 Kevin Mullet가 공저한 » Managing IMAP 책에서 확인할 수 있습니다.

Table of Contents


함수 레퍼런스
PHP Manual