Location: PHPKode > scripts > XS PHP Library > xs-php-library/doc/net/MailReader.html
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Frameset//EN''http://www.w3.org/TR/REC-html40/frameset.dtd'>
<!--NewPage-->
<HTML>
<HEAD>
	<!-- Generated by PhpDoc date: 'Mon, 11 Nov 2002 23:46:49 +0100' -->
	<TITLE>Docs For Class MailReader</TITLE>
<LINK REL ='stylesheet' TYPE='text/css' HREF='stylesheet.css' TITLE='Style'>
</HEAD>
<BODY BGCOLOR='white'>

<!-- Start of Class Data -->
<H2>
	Class MailReader
</H2>
<pre>
<pre><a href="../core/Object.html">Object</a>
   |
   --MailReader</pre>
</pre>
<H3>
	Classes extended from MailReader:
</H3>

<p>
	<b><i>Located in File: Program_Root/mailreader.inc.php</i></b><br>
</p>
<hr>
<!-- ========== Info from phpDoc block ========= -->
<b>MailReader class.</b>
<pre>
MailReader class is a helper class which enables simple fetching mail
 messages from POP3 server. When the connection to the POP3 server will be
 opened multiple messages can be fetched using the MailReader::read() method.
</pre>
<UL>
	
	<LI><b>Package</b> - <CODE>net</CODE></LI>
	
	<LI><b>Version</b> - <CODE>$Id: MailReader.html,v 1.2 2002/11/28 09:45:12 rbala Exp $</CODE></LI>
	
	<LI><b>Access</b> - <CODE>public</CODE></LI>
	
	<LI><b>Author</b> - <CODE>Robert Bala &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</CODE></LI>
	
</UL>

<hr>
<!-- =========== VAR SUMMARY =========== -->
<A NAME='var_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Class Variable Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#$_host'>$_host</A></B></CODE>
			<BR>
			<blockquote> IP address or host name. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#$_pass'>$_pass</A></B></CODE>
			<BR>
			<blockquote> The password used to login to POP3 server. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#$_pop3'>$_pop3</A></B></CODE>
			<BR>
			<blockquote> The POP3 access class. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#$_port'>$_port</A></B></CODE>
			<BR>
			<blockquote> TCP port number. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#$_user'>$_user</A></B></CODE>
			<BR>
			<blockquote> The username used to login to POP3 server. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
</TABLE>

<hr>
<!-- =========== VAR SUMMARY =========== -->
<A NAME='var_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited Class Variable Summary</B></FONT>
		</TD>
	</TR>

	
</TABLE>

<hr>
<!-- =========== INHERITED METHOD SUMMARY =========== -->
<A NAME='functions_inherited'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited Method Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited From Class <a href="../core/Object.html">Object</a></B></FONT>
			<blockquote>
			<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='95%'>
				<tr>
					<th>Function</th>
					<th>Description</th>
				</tr>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#constructor Object'>constructor Object (  )</A></B></CODE></td>
					<td>Object class constructor.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classMethods'>classMethods (  )</A></B></CODE></td>
					<td>Retrieves the class methods names of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#className'>className (  )</A></B></CODE></td>
					<td>Retrieves the name of the class of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classParent'>classParent (  )</A></B></CODE></td>
					<td>Retrieves the parent class name for the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classProperties'>classProperties (  )</A></B></CODE></td>
					<td>Retrieves the class properties names of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#inheritsFrom'>inheritsFrom ( [$class = ] )</A></B></CODE></td>
					<td>Check if the objects inherits from the specified class.</td>
				
			</table>
			</blockquote>
		</TD>
	</TR>
	
</TABLE>

<br>
<!-- should have constructor at some point -->
<!-- =========== Method SUMMARY =========== -->
<A NAME='Method_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Method Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#constructor MailReader'>void constructor MailReader ( $host, $user, $pass, [$port = 110] )</A></B></CODE>
			<BR>
			<blockquote> MailReader class constructor. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#close'>mixed close (  )</A></B></CODE>
			<BR>
			<blockquote> Attempt to close connection from the POP3 server. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#isOpened'>boolean isOpened (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the socket connection is opened. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#open'>mixed open (  )</A></B></CODE>
			<BR>
			<blockquote> Attempt to open connection to the POP3 server. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailReader.html#read'>mixed &read ( $index )</A></B></CODE>
			<BR>
			<blockquote> Attempt to fetch mail message from the POP3 server. </blockquote>
		</TD>
	</TR>
	
</TABLE>

<hbr>
<!-- ============ VARIABLE DETAIL =========== -->

<A NAME='variable_detail'></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Variable Detail</B></FONT>
		</TD>
	</TR>
</TABLE>


<A NAME='$_host'><!-- --></A><H3>$_host</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>IP address or host name.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_pass'><!-- --></A><H3>$_pass</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>The password used to login to POP3 server.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_pop3'><!-- --></A><H3>$_pop3</H3>
<b>Data type:</b> object<br>
<!-- ========== Info from phpDoc block ========= -->
<b>The POP3 access class.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_port'><!-- --></A><H3>$_port</H3>
<b>Data type:</b> int<br>
<!-- ========== Info from phpDoc block ========= -->
<b>TCP port number.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_user'><!-- --></A><H3>$_user</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>The username used to login to POP3 server.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>


<hr>
<!-- ============ FUNCTION DETAIL =========== -->

<A NAME='function_detail'></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Method Detail</B></FONT>
		</TD>
	</TR>
</TABLE>


<A NAME='constructor MailReader'><!-- --></A><H3>constructor MailReader</H3>
<P><B>void constructor MailReader ( $host, $user, $pass, [$port = 110] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>MailReader class constructor.</b>
<pre>
Creates the new instance of MailReader class and sets up basic properties.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $host</i>: IP address or host name.</CODE></DD>
	
	<DD><CODE>- <i>string $user</i>: the username to login.</CODE></DD>
	
	<DD><CODE>- <i>string $pass</i>: the password to login.</CODE></DD>
	
	<DD><CODE>- <i>int $port</i>: TCP port number, defaults to 110.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='close'><!-- --></A><H3>close</H3>
<P><B>mixed close (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempt to close connection from the POP3 server.</b>
<pre>
If called when the connection is not established, it returns error
 object otherwise it returns true on success or a error object with an
 error message on any kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isOpened'><!-- --></A><H3>isOpened</H3>
<P><B>boolean isOpened (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the socket connection is opened.</b>
<pre>
Returns true if the connection is established, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='open'><!-- --></A><H3>open</H3>
<P><B>mixed open (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempt to open connection to the POP3 server.</b>
<pre>
If called when the connection is already established, it returns error
 object otherwise it returns true on success or a error object with an
 error message on any kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='read'><!-- --></A><H3>read</H3>
<P><B>mixed &read ( $index )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempt to fetch mail message from the POP3 server.</b>
<pre>
Returns the <a href="../net/Mail.html">Mail</a> object on success or a error object with an
 error message on any kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>int $index</i>: the message index to retrieve.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>


<hr>
</HTML>
Return current item: XS PHP Library