>PHP: Funciones IMAP, POP3 y NNTP - Manual

MANUAL DE PHP

(y algo mas)windsurf pozo izquierdo
Google
search for in the  
ELMARRAJO.COM mysql bulma desarrollo web linux fedora html ayuda

windsurf mercedes camper

LIX. Funciones IMAP, POP3 y NNTP

Introducción

Estas funciones no se encuentran limitadas al protocolo IMAP, a pesar de su nombre. La biblioteca c-client interna también soporta métodos de acceso a NNTP, POP3 y buzones de correo locales.

Requisitos

Esta extensión requiere que la biblioteca c-client se encuentre instalada. Obtenga la versión más reciente de ftp://ftp.cac.washington.edu/imap/ y compílela.

Es importante que no copie los archivos fuente IMAP directamente al directorio de inclusiones del sistema ya que puede crear conflictos. En su lugar, cree un nuevo directorio al interior del directorio de inclusiones del sistema, tal como /usr/local/imap-2000b/ (la ubicación y nombre dependen de su configuración y versión de IMAP), y al interior de este directorio nuevo cree los directorios adicionales con nombres lib/ e include/. Desde el directorio c-client de su árbol de fuentes IMAP, copie todos los archivos *.h en include/ y todos los *.c en lib/. Adicionalmente, cuando haya compilado IMAP, un archivo llamado c-client.a es creado. Coloque también este archivo en el directorio lib/, pero cambie su nombre a libc-client.a.

Nota: Para compilar la biblioteca c-client con soporte SSL o Kerberos, lea la documentación que viene con el paquete.

Nota: En Mandrake Linux, la biblioteca IMAP (libc-client.a) es compilada sin soporte para Kerberos. Una versión aparte con SSL (client-PHP4.a) es instalada. La biblioteca debe ser recompilada para agregar soporte Kerberos.

Instalación

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.

Nota: 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.

Aviso

La extensión IMAP no puede ser usada junto con las extensiones recode, YAZ ó Cyrus. Esto es debido a que las dos utilizan el mismo símbolo interno

Configuración en tiempo de ejecución

Esta extensión no tiene directivas de configuración en php.ini.

Constantes predefinidas

Estas constantes están definidas por esta extensión y estarán disponibles solamente cuando la extensión ha sido o bien compilada dentro de PHP o grabada dinámicamente en tiempo de ejecución.

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)

Ver también

Este documento no puede entrar en detalles sobre todos los temas que involucran lan funciones ofrecidas. Puede encontrar más información en la documentación de las fuentes de la biblioteca c-client (docs/internal.txt), y en los siguientes documentos RFC:

  • RFC2821: Protocolo Simple de Transferencia de Correo (SMTP).

  • RFC2822: Estándar para los mensajes de texto en internet ARPA.

  • RFC2060: Protocolo de Acceso de Mensaje de Internet (IMAP) Versión 4rev1.

  • RFC1939: Protocolo Post Office Versión 3 (POP3).

  • RFC977: Protocolo de Transferencia de Noticias en Red (NNTP).

  • RFC2076: Cabeceras de Mensajes de Internet Comunes.

  • RFC2045 , RFC2046 , RFC2047 , RFC2048 & RFC2049: Extensiones de Correo de Internet Multi-propósito (MIME).

Una vista general detallada se encuentra disponible también en los libros Programming Internet Email por David Wood y Managing IMAP por Dianna Mullet y Kevin Mullet.

Tabla de contenidos
imap_8bit --  Convierte una cadena de 8bit a una cadena quoted-printable
imap_alerts --  Esta función devuelve todos los mensajes de alerta IMAP (si hubo) que han ocurrido durante la petición de la pagina o desde que la pila de alertas fue inicializada.
imap_append --  Agrega una cadena de mensaje al buzón especificado
imap_base64 -- Decodifica texto codificado en BASE64
imap_binary --  Convierte una cadena de 8bit a una cadena base64
imap_body -- Lee el cuerpo del mensaje
imap_bodystruct --  Read the structure of a specified body section of a specific message
imap_check -- Comprueba el estado del buzón actual
imap_clearflag_full -- Limpia los flags de los mensajes
imap_close -- Cierra una sesión IMAP
imap_createmailbox -- Crea un buzón nuevo
imap_delete --  Marca un mensaje para ser borrado en el buzón actual
imap_deletemailbox -- Elimina un buzón
imap_errors --  Esta función devuelve todos los errores IMAP (si hubo) que han occurrido durante la petición de la página o desde que la pila de errores se inicializó.
imap_expunge -- Elimina todos los mensajes marcados como borrados
imap_fetch_overview --  Read an overview of the information in the headers of the given message
imap_fetchbody -- Localiza una sección particular en el cuerpo del mensaje
imap_fetchheader -- Devuelve la cabecera de un mensaje
imap_fetchstructure --  Lee la estructuta de un mensaje concreto
imap_get_quota --  Retrieve the quota level settings, and usage statics per mailbox
imap_get_quotaroot --  Retrieve the quota settings per user
imap_getacl --  Gets the ACL for a given mailbox
imap_getmailboxes --  Lee la lista de buzones, devolviendo informacón detallada de cada uno
imap_getsubscribed -- Lista todos los buzones subscritos
imap_header -- Lee la cabecera del mensaje
imap_headerinfo -- Read the header of the message
imap_headers --  Returns headers for all messages in a mailbox
imap_last_error --  Esta función devuelve el último error IMAP (si se produjo) que ocurrió durante la petición de esta página.
imap_list -- Read the list of mailboxes
imap_listmailbox -- Lee la lista de buzones
imap_listscan --  Read the list of mailboxes, takes a string to search for in the text of the mailbox
imap_listsubscribed -- Lista todos los buzones subscritos
imap_lsub -- List all the subscribed mailboxes
imap_mail_compose --  Create a MIME message based on given envelope and body sections
imap_mail_copy -- Copia los mensajes especificados a un buzón
imap_mail_move -- Mueve los mensajes especificados a un buzón
imap_mail --  Send an email message
imap_mailboxmsginfo -- Obtiene información acerca del buzón actual
imap_mime_header_decode -- Decode MIME header elements
imap_msgno --  Esta función devuelve el número de secuencia del mensaje para el UID dado.
imap_num_msg --  Informa del número de mensajes en el buzón actual
imap_num_recent -- Informa el número de mensajes recientes en el buzón actual
imap_open -- Abre una sesión IMAP
imap_ping -- Comprueba si la sesión IMAP está aún activa
imap_qprint -- Convierte una cadena quoted-printable a una cadena de 8 bit
imap_renamemailbox -- Renombra un buzón
imap_reopen -- Reabre una sesión IMAP a un nuevo buzón
imap_rfc822_parse_adrlist -- Examina la cadena dirección
imap_rfc822_parse_headers -- Parse mail headers from a string
imap_rfc822_write_address --  Devuleve una dirección de correo correctamente formateada dado el buzón, host, e información personal.
imap_scanmailbox --  Lee la lista de buzones y toma una cadena para buscar en el texto del buzón
imap_search --  Esta función devuelve un array de mensajes que coinciden con el criterio de busqueda dado.
imap_set_quota -- Sets a quota for a given mailbox
imap_setacl --  Sets the ACL for a giving mailbox
imap_setflag_full -- Activa flags en los mensajes
imap_sort -- Ordena un array de cabeceras de mensajes
imap_status --  Esta función devuelve el información de estado de otro buzón distinto al actual.
imap_subscribe -- Subscribe to a mailbox
imap_thread --  Returns a tree of threaded message
imap_timeout --  Set or fetch imap timeout
imap_uid --  Esta función devuelve el UID del número de secuencia del mensaje dado
imap_undelete --  Desmarca los mensajes que están marcados como borrados
imap_unsubscribe -- Unsubscribe from a mailbox
imap_utf7_decode --  Decodes a modified UTF-7 encoded string
imap_utf7_encode --  Converts ISO-8859-1 string to modified UTF-7 text
imap_utf8 --  Converts MIME-encoded text to UTF-8


add a note add a note User Contributed Notes
Funciones IMAP, POP3 y NNTP
spazzatur at gmail dot com
20-Jul-2006 09:57
This is a working example of pop3 mailbox reading...

<HTML>
<HEAD>
<TITLE>Controllo Pop3</TITLE>
</HEAD>
<BODY>
 <STYLE type="text/css">
   TD.exem { color : green ; text-align: justify ; background: red}
   TD.scuro { background: #C0D8FF }
   TD.scurodestro { background: #C0D8FF ; text-align: right }
   TR.chiaro { background: #E0F0FF }
   TR.titolo { background: #4040C0 ; color:#FFFFFF ; font-weight : bold }
 </STYLE>

<?
        
//check for new messages
 
$maxNumeroMessaggi = 19 ;
  
$nomeutente = $_POST['nomeutente'] ;
  
$parola = $_POST['parola'] ;
  
$serverip = $_POST['serverip'] ;

 
?>
<form method="post">
   <table border=0 cellpadding=0 cellspacing=9 bgcolor="#4040C0">
   <TR><TH ALIGN=RIGHT STYLE="color:#FFFFFF">USERNAME:</TD>
       <TD><input name="nomeutente" size=32 value="<? echo $nomeutente ?>" type="text"></TD></TR>
   <TR><TH ALIGN=RIGHT STYLE="color:#FFFFFF">PASSWORD:</TD>
       <TD><input name="parola"    size=16 value="<? echo $parola ?>" type="password"></TD></TR>
   <TR><TH ALIGN=RIGHT STYLE="color:#FFFFFF">SERVER:</TD>
       <TD><input name="serverip"    size=32 value="<? echo $serverip ?>" type="text"></TD></TR>
   <TR><TH COLSPAN=2><input type="submit" name="accedi" value="invia"></TD></TR>
   </table>

  <?

 
if( isset($nomeutente) ) {

  
$mailbox = imap_open"{".$serverip."/pop3:110}INBOX", $nomeutente, $parola  );
  
// Check messages
  
$check = imap_check($mailbox);

  
$numeroMessaggi = $check->Nmsgs ;
  
$dimensioneCasella = $check->Size ;
  
$dalMessaggio = max(1,$numeroMessaggi-$maxNumeroMessaggi) ;

  
//print "<H4>Dimensione totale casella: $dimensioneCasella bytes</H4>" ;

  
print "Messaggi dal $dalMessaggio al $numeroMessaggi\n";
   print
"<TABLE cellpadding=1 cellspacing=0 BGCOLOR='#80B0FF'>\n" ;
   print
"<TR class='titolo'><TD>N.</TD><TD>Data:</TD><TD>Dim:</TD>".
        
"<TD>Da:</TD><TD>Oggetto:</TD><TD>A:</TD></TD></TR>\n" ;
   for(
$index=$dalMessaggio ; $index <= $numeroMessaggi ; $index++ ) {
    
$header = imap_header($mailbox, $index);
    
$size = number_format( $header->Size, 0, ',', '.');
    
//print "<TR><TD>$index</TD></TR>\n" ;
    
print "<TR class='chiaro'><TD class='scuro'>$index <INPUT TYPE=CHECKBOX NAME=CB$index VALUE=1></TD><TD>".
          
$header->Date ."</TD><TD class='scurodestro'>$size</TD><TD>".
          
$header->fromaddress ."</TD><TD class='scuro'>".
          
$header->Subject ."</TD><TD>". $header->toaddress ."</TD></TR>\n" ;
   }
   print
"<TR class='titolo'><TD>N.</TD><TD>Data:</TD><TD>Dim:</TD>".
        
"<TD>Da:</TD><TD>Oggetto:</TD><TD>A:</TD></TD></TR>\n" ;
   print
"</TABLE>" ;
   print
"Messaggi dal $dalMessaggio al $numeroMessaggi\n";
  
imap_close($mailbox);
  }
?>
<input type=submit name=canc value="Cancella Messaggi">
<input type=submit name=vedi value="Vedi Messaggi">
<input type=submit name=inol value="Inoltra Messaggi">

</form>

</BODY></HTML>
James Triplett <jm-php at vj8 dot net>
05-Apr-2006 07:50
Building Apache2, PHP and IMAP requires a shareable version
of the c-client library, but the standard UW code doesn't provide one.
I couldn't find any way to build with the libc-client.a without generating piles of relocation errors. (gcc on Solaris 10)

The IMAP c-client library can be built shareable with the following steps:
1. fix the Makefile in .../imap-2004/c-client to include:
BASECFLAGS="-fPIC -O3"
2. make
3. mkdir tmp
4. cd tmp
5. ar xv ../c-client.a  (to extract the .o files)
6. gcc -shared -o c-client.so *.o  (to create the .so library)
7. copy that c-client.so to /usr/local/imap/lib/libc-client.so
   (it may be necessary to hide the libc-client.a)
8. configure PHP ; make; make install
info at toyflish dot de
15-Dec-2005 02:26
if you are on SuSE9.3 64 and still compiling errors you have to add the -fPIC flag to the  EXTRACFLAGS in imap-Makefile.
BjarneDM macintosh at mathiesen dot info
20-Oct-2005 12:49
Mac OS X client install notes with DarwinPorts

The c-client.a isn't present on your system after you've installed the imap-uw package. !But! it's actually present at a specific time during the install phase as it's being complied from source - it's just deleted at the end of the compilation process. So, we'll have to break the install process down into it's component processes and get hold of what we need at the appropriate time:

sudo port fetch imap-uw
sudo port extract imap-uw
sudo port patch imap-uw
sudo port configure imap-uw
sudo port build imap-uw
imapLib=/darwinports/var/db/dports/distfiles/imap-uw/lib
imapIncludes=/darwinports/var/db/dports/distfiles/imap-uw/include
sudo mkdir ${imapLib} ${imapInclude}
cd /darwinports/var/db/dports/build/*/*/*/c-client
sudo cp *.c ${imapLib}
sudo cp *.h ${imapIncludes}
sudo cp c-client.a ${imapLib}/libc-client.a
cd ${imapLib}
ranlib - libc-client.a
sudo port install imap-uw

Now, you can just specify:
   --with-imap=/darwinports/var/db/dports/distfiles/imap-uw \
   --with-imap-ssl=/darwinports \
in your ./configure command.
php at got2get dot net
07-Sep-2005 08:04
Install note for FreeBSD:

If you get this:

/libexec/ld-elf.so.1: /usr/local/lib/php/20041030/imap.so: Undefined symbol "ssl_onceonlyinit"

...in your httpd-error.log.

It is because you compiled cclient without SSL support.

However. In order for me to get SquirrelMail woorking, I had to install ports/mail/imap-uw with WITHOUT_SSL=yes and same option for ports/mail/cclient. After doing this, I recompiled cclient w/o any options to get SSL support, and then installed posrt/mail/php5-imap.

This works. But if you just want SSL everywhere - install imap-uw normally, which will install cclient too. After that, install php5-imap normally as well - and you have a working system with SSL.

Hope this saves more people from wasting too much time like I just did ;)

 - Nicolai
sinasalek at gmail dot com
24-Jun-2005 07:35
if you want connect to Secure(SSL) POP3 server, enabling openssl isn't enough in windows,
take a look at this
http://archives.devshed.com/a/ng/557-23605/
v dot 0000000001 dot -0006398047 at vertabiz dot com
23-Jun-2005 09:01
Since this library at a whole is fairly poorly documented, and it doesn't help that there's 30-something functions, and many of the functions do the same things, I have gone through and categorized the functions.  Hopefully this will help somebody else, I know it will help me!! -Justin

CONNECTION, ERRORS & QUOTAS
===========================
imap_timeout
imap_ping
imap_open
imap_reopen
imap_close
imap_check **(fairly useless)
imap_alerts
imap_errors
imap_last_error
imap_get_quota
imap_get_quotaroot
imap_set_quota

MESSAGES - READING
==================
imap_uid
imap_msgno
imap_fetchbody
imap_fetchheader
imap_fetchstructure
imap_fetch_overview
imap_body
imap_rfc822_parse_adrlist
imap_rfc822_parse_headers

MESSAGES - WRITING
==================
imap_mail_compose
imap_mail
imap_append
imap_rfc822_write_address

MESSAGES - OPERATIONS
=====================
imap_undelete
imap_thread
imap_delete
imap_mail_copy
imap_mail_move
imap_expunge
imap_clearflag_full
imap_setflag_full

MESSAGES - DECODE/ENCODE
========================
imap_utf7_decode
imap_utf7_encode
imap_utf8
imap_8bit
imap_base64
imap_binary
imap_mime_header_decode
imap_qprint

FOLDERS
=======
imap_createmailbox
imap_deletemailbox
imap_getmailboxes
imap_mailboxmsginfo
imap_renamemailbox
imap_headers **(fairly useless)
imap_status
imap_sort
imap_search
imap_listscan

NNTP
====
imap_unsubscribe
imap_subscribe
imap_getsubscribed

UNUSED (should be deprecated)
=============================
imap_num_msg - use imap_mailboxmsginfo()
imap_num_recent - use imap_mailboxmsginfo()
imap_header - alias of imap_headerinfo()
imap_scanmailbox - alias of imap_listscan()
imap_listsubscribed - alias of imap_lsub()
imap_listmailbox - alias of imap_list()
imap_lsub - use imap_getsubscribed()
imap_list - use imap_getmailboxes()
imap_bodystruct - not documented
imap_getacl - not documented
imap_setacl - not documented
imap_headerinfo - use imap_fetch_overview()
Anonymous
13-Apr-2005 12:13
If you are having difficulty compiling on netbsd from source and want imap support then you should know that the c-client library is compiled with kerberos support.  Unfortunately gssapi_krb5 and k5crypto is not on the system (or at least wasn't for me).  I didn't have administrative level access to add these libraries so I had to do the following.  I still have to test that it worked 100% but at least it compiled without complaining.

Comment the following segments from the configure script.

Segment 1 -- test for gssapi_krb5 library

  case gssapi_krb5 in
  c|c_r|pthread*) ;;
  *)
   if test "$ext_shared" = "yes"; then
       IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lgssapi_krb5"
   else
 
 
  case gssapi_krb5 in
  c|c_r|pthread*) ;;
  *)
     LIBS="$LIBS -lgssapi_krb5"
   ;;
  esac

   fi
   ;;
  esac

Segment 2 -- test for k5crypto

  case k5crypto in
  c|c_r|pthread*) ;;
  *)
   if test "$ext_shared" = "yes"; then
       IMAP_SHARED_LIBADD="$IMAP_SHARED_LIBADD -lk5crypto"
   else

  case k5crypto in
  c|c_r|pthread*) ;;
  *)
     LIBS="$LIBS -lk5crypto"
   ;;
  esac

   fi
   ;;
  esac

BTW.  Since I was only compiling for the modules (they have suPHP so I compile all my own modules when I need them) I only dropped this in for the php configure script parameters

./configure --with-imap=shared,xxxxxx --with-kerberos=xxxxxx --with-imap-ssl

This is verified working via an imap test.  One excellent test that I located on the phpbuilder.com site.  Here it is.  Modify the address, port, protocol type, username, and password appropriately.  The post was 5 years old but the script still works fine.  The posters name was "Matthew"

<HTML>
<HEAD>
<TITLE>imap_check</TITLE>
</HEAD>
<BODY>
<?
        
//check for new messages

        
$mailbox = imap_open("{localhost/pop3:110}INBOX",
                
"#username#","#password#");

        
// Check messages
        
$check = imap_check($mailbox);
         print(
"<PRE>");
         print(
"Date most recent message : " . $check->Date);
         print(
"<BR>");
         print(
"Connection type : " . $check->Driver);
         print(
"<BR>");
         print(
"Name of the mailbox : " . $check->Mailbox);
         print(
"<BR>");
         print(
"Number of messages : " . $check->Nmsgs);
         print(
"<BR>");
         print(
"Number of recent messages : " . $check->Recent);
         print(
"<BR>");
         print(
"</PRE>");

        
// show headers for messages

        
$index=1;

        
$header = imap_header($mailbox, $index);
         print(
"<PRE>");
         print(
"Header Date : " . $header->Date . "<BR>");
         print(
"Header To : " . $header->to) . "<BR>";
         print(
"Header From : " . $header->From . "<BR>");
         print(
"Header cc : " . $header->cc . "<BR>");
         print(
"Header ReplyTo : " . $header->ReplyTo . "<BR>");
         print(
"Header Subject : " . $header->Subject . "<BR></PRE>");

         print(
"<PRE>");
         print(
imap_body($mailbox,$index));
         print(
"</PRE><HR>");

        
imap_close($mailbox);
?>

</BODY></HTML>
seem dot iges at mail dot ee
15-Feb-2005 05:48
If you like me disvoer that "make slx" fails, but you're damn sure you've openssl installed then, it might be that the lib and include paths on your distro are different then the defaults provided in the imap-2004a (or imap-XXXXx). To modify go to dir ../imap-2004a/src/osdep/unix and edit the section (shown below) in the Makefile

# Extended flags needed for SSL.  You may need to modify.

#SSLDIR=/usr/local/ssl
SSLDIR=/etc/ssl
SSLCERTS=$(SSLDIR)/certs
SSLKEYS=$(SSLCERTS)
#SSLINCLUDE=$(SSLDIR)/include
SSLINCLUDE=/usr/include/openssl
#SSLLIB=$(SSLDIR)/lib
SSLLIB=/usr/lib

SSLCRYPTO=-lcrypto

Commented out SSLDIR, SSLINCLUDE and SSLIB are defaults and the uncommented are valid paths for Slackware (10.0/10.1).
You should also check your ld.so.conf for valid paths.
antivert
13-Jan-2005 08:55
Note that is not not necessary to disable SSL in the IMAP compile to make it work with PHP 5.0.3.

1. Compile IMAP with SSL support for your system:

cd /path/to/imap/source/
make <system type> (ldb, lnx, etc)
mkdir include
mkdir lib

2. Make links in IMAP source directory:

cd /path/to/imap/source/c-client
cp *.h ../include/
cp *.c ../lib/
cp c-client.a ../lib/libc-client.a

3. Compile PHP with SSL support,  --with-imap=/path/to/imap/source/ . If SSL support fails, you'll get a configure-time error that IMAP doesn't work. This is a lie, you just need to get SSL support working in PHP. On certain linux systems, with OpenSSL 0.9.7, this means adding --with-openssl=/usr (if the OpenSSL files are in /usr/include/openssl/) instead of the proper directory containing the OpenSSL files. For some reason, giving a parent directory makes PHP able to find the OpenSSL include files.

4. PHP should build.

Alternately, you can disable SSL during the IMAP build, as per the previous directions posted here.
amit dot gupta at prudence-india dot com
18-Nov-2004 12:44
I faced problem in compiling imap with php-5.0.2 release version. Then following commands on snapshot version solved my problem

# tar -zxvf imap-2004b.DEV.tar.Z
# cd imap-2004b.DEV.SNAP-0411051435/
# make lnp SSLTYPE=none
# cp -r /usr/local/imap-2004b.DEV.SNAP-0411051435/c-client/*.h /usr/local/imap-2004b.DEV.SNAP-0411051435/include/

# cp -r /usr/local/imap-2004b.DEV.SNAP-0411051435/c-client/*.c /usr/local/imap-2004b.DEV.SNAP-0411051435/lib/

# ln -s /usr/local/imap-2004b.DEV.SNAP-0411051435/c-client/c-client.a /usr/local/imap-2004b.DEV.SNAP-0411051435/lib/libc-client.a

# tar -zxvf php5-STABLE-200411180530.tar.gz

# cd php5-STABLE-200411180530

./configure  --with-apxs2=/usr/sbin/apxs --enable-shared --with-mod_charset --enable-force-cgi-redirect --enable-fastcgi --enable-magic-quotes --with-openssl  --with-zlib  --enable-bcmath  --enable-calendar --with-curl  --with-curlwrappers  --enable-dba  --with-gdbm --with-cdb  --with-inifile  --with-flatfile  --enable-dbase  --enable-dbx    --enable-dio --with-fam  --enable-filepro  --enable-ftp  --with-ldap  --enable-mbstring --with-mysql=/usr/include  --with-zlib-dir  --enable-shmop --enable-soap  --enable-sockets    --enable-sysvmsg  --enable-sysvsem  --enable-sysvshm  --enable-wddx --with-pic --enable-versioning  --with-pgsql --with-java=/usr/java/jdk1.5.0/  --with-imap=/usr/local/imap-2004b.DEV.SNAP-0411051435 --with-kerberos

# make

# make install

Thus, php compiled sucessufully with imap support on fedora core 1.
Pete Spicer, sleeping [at] myperch.org
17-Jul-2004 03:19
I have a pretty much stock set-up of SuSE 8.1 Personal (Apache, PHP et al built by me) and IMAP-2004 refused to build for me.

What I found was, using the make lsu (for SuSE) almost worked built I was getting odd build results, i.e. make failures.

The problem? GCC 3.2. If you don't have an older GCC available, please install one! I installed the gcc_old package from SuSE and built with the following command:

CC=gcc297 make lsu SSLTYPE=none

The result was a perfect build. So if you are getting errors, please try an earlier build of GCC.
Tomas V.V.Cox
11-May-2004 06:15
For compiling this extension without compiling imap from sources I did (this was mandrake):

Install the following rpms:
imap
imap-devel
openssl
openssl-devel
krb5
krb5-devel
pam
pam-devel

Do the trick:
# mkdir /usr/include/imap/lib
# cp /usr/lib/libc-client-PHP4.a /usr/include/imap/lib/libc-client.a

And the configure line:
./configure <options> --with-imap=/usr/include/imap --with-imap-ssl

(don't forget --enable-pear ;)
sysadmin at grmtech dot com
27-Mar-2004 04:01
The manual mentions:
"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.
"

A. Please do not copy rather make symbolic links like this:
ln -s c-client include
ln -s c-client lib

B. You do not need to copy c-client.a to libc-client.a.
The make command used to compile the imap-2002e source code creates the symbolic link from c-client.a to libc-client.a

The imap client version used for the above two points is:
1. imap-2002e

my 2 cents,

sysadmin
http://www.grmtech.com
peder at godvik dot no
09-Mar-2004 08:24
Additionally to Mauricio's procedure; You must check the Makefile to find the correct system type that you are compiling on. Mauricio's example assumes you are using Linux. -Check the README for imap-xxxx for further details.
Fjor
14-Feb-2004 05:50
Additionally to Mauricio's procedure, I had to make a symlink to the c-client library this way:

cd imap-xxxx/c-client
ln -s c-client.a libc-client.a

(Tested with imap-200e)

Fjor (GDL/Mexico)
dev at puertocity dot com
26-Nov-2003 08:38
A tip for imap support installation:

With SSL support:
------------------
tar -zxf imap-xxxxx.tar.Z
cd imap-xxxxx
make slx
ln -sf c-client include
ln -sf c-client lib
cd ..
tar -jxf php-4.3.x.tar.bz2
cd php-4.3.x
./configure --with-imap=../imap-xxxxx --with-imap-ssl=/path-to-openssl

With out SSL support:
---------------------
tar -zxf imap-xxxxx.tar.Z
cd imap-xxxxx
make slx SSLTYPE=none
ln -sf c-client include
ln -sf c-client lib
cd ..
tar -jxf php-4.3.x.tar.bz2
cd php-4.3.x
./configure --with-imap=../imap-xxxxx

Good Luck
Mauricio
millz at incogen dot com
10-Oct-2003 04:19
I experienced a problem when adding IMAP support into PHP.  The php configure script would die when trying to see if "IMAP Works..." and the config.log would complain about libc-client.a references. 
It was similar to the problem reported here:
http://lists.horde.org/archives/imp/Week-of-Mon-20030915/034692.html 

I resolved it by compiling IMAP like this (replace <ARCH> with the proper OS type for your system, get that from the top of the Makefile):

make <ARCH> SSLTYPE=none

That turned off the SSL support in the IMAP files and seemed to resolve my php compile problem.

BTW, I also followed the directions about making a new /usr/local/imap... directory that are mentioned at the top of the page.
k3nny at squidart dot co dot za
31-Jul-2003 05:02
After having numerous problems compiling PHP with IMAP support, both PHP problems and IMAP problems I found this simple solution to the problem, which I've tried with several versions of IMAP and all worked perfectly!

tar -zxf imap-xxxxx.tar.Z
cd imap-xxxxx
make slx
ln -sf c-client include
ln -sf c-client lib
cd ..
tar -jxf php-4.3.x.tar.bz2
cd php-4.3.x
./configure --with-imap=../imap-xxxxx

It worked everytime for me, hope it does for you!

Kenneth
designer at bs-dee dot org
09-Mar-2003 04:27
The only c-client that has worked 100% with php is

ftp://ftp.cac.washington.edu/imap/old/imap-2001.FINAL.tar.Z

DO NOT DOWNLOAD 2002 B its BUGGY!
keeper at odi dot com dot br
01-Mar-2003 12:37
For those working with mail talke a look ate the pear class
Mime decode:

http://pear.php.net/package/Mail_Mime

Dotrinador
naveed at php dot net
12-Jan-2003 07:49
Beware!
If you are trying to make a connection with POP3 mailbox,then some of IMAP functions will not work correctly as you might expecting .This is because the difference of workings in POP3 and IMAP protocols.
These functions work correctly for IMAP mailboxes but some of the fnctions will return nothing, when connected to a POP3 mailbox.(even no error message).
duckel at electroporn dot de
22-May-2002 11:16
please don't copy the .h files in the system include directory! the unix.h file from the washington.edu c-client conflicts with another file called unix.h
make a dir called "imap" in either /usr/include or /usr/local/include or whatever you wish, copy the header files there and the .a file prefix'ish in /usr/lib or /usr/local/lib or whatever you used for the include files.
then tell configure with --with-imap=/usr the "prefix" of your installation.
then works without problem ;)
netshadow at madpoets dot org
03-Nov-2001 01:42
I just found something a bit bizarre.  I was having problems with the pages taking too long to load (15-20sec) when they opened an imap connection.  I was pulling my hair out trying to figure out what was wrong.

Turns out it was quite simple.  I was letting it default to 143 for the port.  When i specified the port number (i.e. {localhost:143} rather than {localhost} )  It reduced page load time to a few seconds.
raoul at runtheotherway dot com
22-Oct-2001 07:11
I have found the order in which you connect to you POP server with IMAP 2000 and your database with PostgreSQL 7.1.2 can cause problems.

Make sure that you connect first to your POP server then get your db connection. This will prevent you from getting an invalid stream from imap_open().

Citas célebres

Quien no ama con sus cinco sentidos a una mujer hermosa, no aprecia de la naturaleza la que es su mejor obra.

François-Marie Arouet de Voltaire
Filósofo francés
(1694-1778)
Citas en tu mail
©Contenidos Gratis

Ilusiones Opticas
ilusion_optica_017.jpg
Contenidos Web

Chiste de... Parejas
Papá llama

¡Ring, Ring!!

- ¿Diga?

- Hijo, dile a mamá que se ponga. (Al rato vuelve el niño)

- No se pue poné poque está con Papá en la cama.

- ¡Pero eso cómo va a ser niño, si Papá soy yo!!

- Bueno, Papa, pues Mamá está con un señor en la cama.

- .... me cago en la mar serena otra vez me la esta pegando...

- Mira, hijo, vete a la cocina y coge er cushillo más grande que haya.

(Al rato vuelve el niño)

- Ya esta Papa.

- Ahora, vete ar cuarto, los acushillas a los dos y los cortas en peacitos.

(Al rato vuelve el niño)

- Ya esta Papa.

- Pue ahora, coge un saco de la despensa y mete to los trositos dentro.

(Al rato vuelve el niño)

- Ya esta Papa.

- Bueno pue coge er saco y lo tiras al pozo que hay en el patio.

- Papa si nosotro no tenemo pozo, vivimos en un quinto piso.

- Pero niño, ¡a qué numero he llamao yo!!!
Chistes en tu mail
©ContenidosGratis

Humor Gráfico
humor_grafico_023.jpg
Contenidos Web

Inicio | Acción | Estrategia | Palabras | Puzzles | Solitarios | Foro Trucos
Cake ManiaCake Mania
Jugadores: 6835
Categoría del juego: Acción
Objetivo del juego: Ayuda a Jill a recuperar la pastelería de su abuela llevando su propia pastelería; consigue clientes y gana dinero.
Rainbow WebRainbow Web
Jugadores: 2199
Categoría del juego: Puzzles
Objetivo del juego: Rompe un pegajoso hechizo y salva un reino de fantasía en Rainbow Web. Tendrás toneladas de diversión mientras juegas a este mágico desafío para la mente.
Mahjongg FortunaMahjongg Fortuna
Jugadores: 12462
Categoría del juego: Solitarios
Objetivo del juego: Velocidad y habilidad mental son las armas más importantes en esta versión de un antiguo juego asiático. Despeja el tablero lo antes posible haciendo clic en las fichas iguales y gánate la fama eterna de la puntuación más alta.
Chainz 2Chainz 2
Jugadores: 6955
Categoría del juego: Puzzles
Objetivo del juego: Entra en el mundo de las combinaciones con Chainz 2: Relinked, emocionante secuela del exitazo del año pasado, Chainz. Gira eslabones y crea combinaciones de 3 ó más.
DeliciousDelicious
Jugadores: 4405
Categoría del juego: Acción
Objetivo del juego: ¿Eres un as de la multitarea? ¿Quieres que tus clientes estén contentos? ¡Pues Delicious es tu juego! Sacia el apetito de los clientes y tenlos contentos; ¡no te arriesgues!
BookwormBookworm
Jugadores: 4568
Categoría del juego: Palabras
Objetivo del juego: Junta las letras para formar palabras. ¡Las palabras más largas valen más puntos!
ZumaZuma
Jugadores: 4976
Categoría del juego: Acción
Objetivo del juego: Controla el ídolo de la rana de piedra de los antiguos Zuma en este intrigante enigma de acción. ¡Dispara bolas para formar conjuntos de tres, pero si dejas que lleguen a la calavera dorada morirás!
Jewel of AtlantisJewel of Atlantis
Jugadores: 3798
Categoría del juego: Puzzles
Objetivo del juego: Descubre la ciudad hundida de la Atlántida y busca valiosos tesoros. Viaja más allá de las profundidades del mar y vive trepidantes aventuras en Jewel of Atlantis.
Jewel QuestJewel Quest
Jugadores: 3727
Categoría del juego: Puzzles
Objetivo del juego: Convierte la arena de la antigua selva en oro tan rápido como puedas juntando grupos de 3 elementos. ¡Los grupos más grandes valen más puntos!
Bejeweled 2Bejeweled 2
Jugadores: 3659
Categoría del juego: Puzzles
Objetivo del juego: Con cuatro modos de juego únicos y fascinantes, nuevas piezas de juego explosivas e imponentes fondos planetarios, Bejeweled 2 es mucho más adictivo que nunca.
Contenidos gratis en tu webSiguiente >>

Fotos divertidas
fotos_increibles_0030.jpg
Contenidos Web
microrobots avion deportes riesgo recetas cocina canaria juegos online gratis moto motociclismo horoscopos naranjas valencianas surf canarias montañismo ciudades turismo postales gratis library Horoscopos Diarios Windsurf Canarias
fregadero microondas placa electrica bañopreparar camper pantalla plananevera compresor electricacamper fiat ducato camper baño quimicomampara enrollable bañocamper aire climatizadofurgoneta surf windsurffurgoneta surf windsurftelevisor furgonetas camperfurgonetas camper cama

Sudoku del día
Nivel de dificultad: Fácil



Cómo jugar:
El juego consiste en colocar los números del 1 al nueve de tal forma que no se repita el mismo número en la columna, fila y caja (bloques 3x3 enmarcados).

©Contenidos Gratis | Sudoku en tu mail
Sucedió el...

30 de agosto de 1617

Fallece Santa Rosa de Lima, por la que se celebra el "Día de la Patrona de América".
Efemérides en tu mail
©Contenidos Gratis
windsurf canarias youtube porno canarias baleares valencia madrid