These functions are not limited to the IMAP protocol,
despite their name. The underlying c-client library also supports
NNTP, POP3 and local mailbox access
methods.
This extension requires the c-client library to be installed.
Grab the latest version from ftp://ftp.cac.washington.edu/imap/
and compile it.
It's important that you do not copy the IMAP source files directly into
the system include directory as there may be conflicts. Instead, create
a new directory inside the system include directory, such as
/usr/local/imap-2000b/ (location and name
depend on your setup and IMAP version), and inside this new
directory create additional directories named lib/
and include/. From the c-client
directory from your IMAP source tree, copy all the *.h
files into include/ and all the
*.c files into lib/.
Additionally when you compiled IMAP, a file named
c-client.a was created. Also put this in the
lib/ directory but rename it as
libc-client.a.
Note:
To build the c-client library with SSL or/and Kerberos support read
the docs supplied with the package.
Note:
In Mandrake Linux, the IMAP library (libc-client.a)
is compiled without Kerberos support. A separate version with SSL
(client-PHP4.a) is installed. The library must
be recompiled in order to add Kerberos support.
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
The IMAP extension cannot be used in conjuction with
the recode, YAZ or Cyrus extensions. This is due to the fact that they
both share the same internal symbol.
The constants below are defined by this extension, and
will only be available when the extension has either
been compiled into PHP or dynamically loaded at runtime.
This document can't go into detail on all the topics touched by
the provided functions. Further information is provided by the
documentation of the c-client library source
(docs/internal.txt). and the following RFC
documents:
ref.imap php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php ref.imap syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.