<HTML ><HEAD ><TITLE >imap_headerinfo</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_header" HREF="function.imap-header.html"><LINK REL="NEXT" TITLE="imap_headers" HREF="function.imap-headers.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-header.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-headers.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.imap-headerinfo" ></A >imap_headerinfo</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN38266" ></A ><P > (PHP 3, PHP 4 )</P >imap_headerinfo -- Read the header of the message</DIV ><DIV CLASS="refsect1" ><A NAME="AEN38269" ></A ><H2 >Description</H2 >object <B CLASS="methodname" >imap_headerinfo</B > ( resource imap_stream, int msg_number [, int fromlength [, int subjectlength [, string defaulthost]]])<BR ></BR ><P > This function returns an object of various header elements. </P ><P > <DIV CLASS="informalexample" ><A NAME="AEN38291" ></A ><P ></P ><P CLASS="literallayout" ><br> remail, date, Date, subject, Subject, in_reply_to, message_id,<br> newsgroups, followup_to, references<br> <br> message flags:<br> Recent - 'R' if recent and seen, <br> 'N' if recent and not seen, <br> ' ' if not recent<br> Unseen - 'U' if not seen AND not recent, <br> ' ' if seen OR not seen and recent<br> Answered -'A' if answered, <br> ' ' if unanswered<br> Deleted - 'D' if deleted, <br> ' ' if not deleted<br> Draft - 'X' if draft, <br> ' ' if not draft<br> Flagged - 'F' if flagged, <br> ' ' if not flagged<br> <br> NOTE that the Recent/Unseen behavior is a little odd. If you want to<br> know if a message is Unseen, you must check for<br> <br> Unseen == 'U' || Recent == 'N'<br> <br> toaddress (full to: line, up to 1024 characters)<br> <br> to[] (returns an array of objects from the To line, containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> fromaddress (full from: line, up to 1024 characters)<br> <br> from[] (returns an array of objects from the From line, containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> ccaddress (full cc: line, up to 1024 characters)<br> cc[] (returns an array of objects from the Cc line, containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> bccaddress (full bcc line, up to 1024 characters)<br> bcc[] (returns an array of objects from the Bcc line, containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> reply_toaddress (full reply_to: line, up to 1024 characters)<br> reply_to[] (returns an array of objects from the Reply_to line,<br> containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> senderaddress (full sender: line, up to 1024 characters)<br> sender[] (returns an array of objects from the sender line, containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> return_path (full return-path: line, up to 1024 characters)<br> return_path[] (returns an array of objects from the return_path line,<br> containing):<br> personal<br> adl<br> mailbox<br> host<br> <br> udate (mail message date in unix time)<br> <br> fetchfrom (from line formatted to fit <TT CLASS="parameter" ><I >fromlength</I ></TT > <br> characters)<br> <br> fetchsubject (subject line formatted to fit <TT CLASS="parameter" ><I >subjectlength</I ></TT > characters)<br> </P ><P ></P ></DIV > </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-header.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-headers.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >imap_header</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_headers</TD ></TR ></TABLE ></DIV ></BODY ></HTML >