Location: PHPKode > projects > EXtensible Production Suite (XPS) > xpsdev/helpers/xpm3/DOCUMENTATION/pop3/receive.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
body, pre {
	font-family: Verdana;
	font-size: 10pt;
<body bgcolor="#f1f3f5" topmargin="10" leftmargin="14">

XPM3_POP3 :: <i>mixed</i> <b>receive</b> ( <i>resource</i> connection, <i>integer</i> start [, <i>integer</i> length ] )
Returns ARRAY if has been successfully recived, FALSE if not.

Get information about message(s) order by old to last mail received.
The order of message(s) is like in "substr()" function from PHP.

<table border="0" bgcolor="white">
$open = XPM3_POP3::Connect('pop.hostname.tld', 'username', 'password');

$recv = XPM3_POP3::Receive($open);       // &lt;- get all mesages
$recv = XPM3_POP3::Receive($open, -1);   // &lt;- get the last 1 mail
$recv = XPM3_POP3::Receive($open, -2);   // &lt;- get the lastest 2 mails
$recv = XPM3_POP3::Receive($open, 0, 1); // &lt;- get the old mail

// print result
if ($recv) print_r($recv);
else echo 'Message(s) not found.';

<hr color="white">

[ <a style="color: blue; text-decoration: none" href="mailto:hide@address.com?subject=Comment XPM3_POP3 Receive">Comments</a> ]

Last update: Wednesday, December 27, 2006


Return current item: EXtensible Production Suite (XPS)