Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 1129

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>imap_fetch_overview</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="IMAP, POP3 and NNTP functions"
HREF="ref.imap.html"><LINK
REL="PREVIOUS"
TITLE="imap_expunge"
HREF="function.imap-expunge.html"><LINK
REL="NEXT"
TITLE="imap_fetchbody"
HREF="function.imap-fetchbody.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.imap-expunge.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.imap-fetchbody.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.imap-fetch-overview"
></A
>imap_fetch_overview</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN37842"
></A
><P
>    (PHP 3&#62;= 3.0.4, PHP 4 )</P
>imap_fetch_overview&nbsp;--&nbsp;
     Read an overview of the information in the headers of the given message
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN37845"
></A
><H2
>Description</H2
>array <B
CLASS="methodname"
>imap_fetch_overview</B
> ( resource imap_stream, string sequence [, int options])<BR
></BR
><P
>&#13;     This function fetches mail headers for the given
     <TT
CLASS="parameter"
><I
>sequence</I
></TT
> and returns an overview of their
     contents. <TT
CLASS="parameter"
><I
>sequence</I
></TT
> will contain a sequence
     of message indices or UIDs, if <TT
CLASS="parameter"
><I
>flags</I
></TT
>
     contains FT_UID. The returned value is an array of objects
     describing one message header each:
     <P
></P
><UL
><LI
><P
>&#13;        subject - the messages subject
       </P
></LI
><LI
><P
>&#13;        from - who sent it
       </P
></LI
><LI
><P
>&#13;        date - when was it sent
       </P
></LI
><LI
><P
>&#13;        message_id - Message-ID 
       </P
></LI
><LI
><P
>&#13;        references - is a reference to this message id
       </P
></LI
><LI
><P
>&#13;        size - size in bytes
       </P
></LI
><LI
><P
>&#13;        uid - UID the message has in the mailbox
       </P
></LI
><LI
><P
>&#13;        msgno - message sequence number in the maibox
       </P
></LI
><LI
><P
>&#13;        recent - this message is flagged as recent
       </P
></LI
><LI
><P
>&#13;        flagged -  this message is flagged
       </P
></LI
><LI
><P
>&#13;        answered -  this message is flagged as answered
       </P
></LI
><LI
><P
>&#13;        deleted -  this message is flagged for deletion
       </P
></LI
><LI
><P
>&#13;        seen -  this message is flagged as already read
       </P
></LI
><LI
><P
>&#13;        draft -  this message is flagged as being a draft
       </P
></LI
></UL
>
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN37893"
></A
><P
><B
>Example 1. <B
CLASS="function"
>imap_fetch_overview()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$mbox = imap_open("{your.imap.host:143}","username","password")
     or die("can't connect: ".imap_last_error());
 
$overview = imap_fetch_overview($mbox,"2,4:6",0);
 
if(is_array($overview)) {
        reset($overview);
        while( list($key,$val) = each($overview)) {
                print     $val-&#62;msgno
                . " - " . $val-&#62;date
                . " - " . $val-&#62;subject
                . "\n";
        }
}
 
imap_close($mbox);</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.imap-expunge.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.imap-fetchbody.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>imap_expunge</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.imap.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>imap_fetchbody</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>