<HTML ><HEAD ><TITLE >imap_body</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_binary" HREF="function.imap-binary.html"><LINK REL="NEXT" TITLE="imap_bodystruct" HREF="function.imap-bodystruct.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-binary.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-bodystruct.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.imap-body" ></A >imap_body</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN37589" ></A ><P > (PHP 3, PHP 4 )</P >imap_body -- Read the message body</DIV ><DIV CLASS="refsect1" ><A NAME="AEN37592" ></A ><H2 >Description</H2 >string <B CLASS="methodname" >imap_body</B > ( resource imap_stream, int msg_number [, int options])<BR ></BR ><P > <B CLASS="function" >imap_body()</B > returns the body of the message, numbered <TT CLASS="parameter" ><I > msg_number</I ></TT > in the current mailbox. The optional <TT CLASS="parameter" ><I >flags</I ></TT > are a bit mask with one or more of the following: <P ></P ><UL ><LI ><P > FT_UID - The <TT CLASS="parameter" ><I >msgno</I ></TT > is a UID </P ></LI ><LI ><P > FT_PEEK - Do not set the \Seen flag if not already set </P ></LI ><LI ><P > FT_INTERNAL - The return string is in internal format, will not canonicalize to CRLF. </P ></LI ></UL > </P ><P > <B CLASS="function" >imap_body()</B > will only return a verbatim copy of the message body. To extract single parts of a multipart MIME-encoded message you have to use <A HREF="function.imap-fetchstructure.html" ><B CLASS="function" >imap_fetchstructure()</B ></A > to analyze its structure and <A HREF="function.imap-fetchbody.html" ><B CLASS="function" >imap_fetchbody()</B ></A > to extract a copy of a single body component. </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-binary.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-bodystruct.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >imap_binary</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_bodystruct</TD ></TR ></TABLE ></DIV ></BODY ></HTML >