print($headers[$index]. "
\n");
}
imap_close($mailbox);
?>
string imap_last_error()
Use imap_last_error to get the last error generated by an IMAP function.
imap_list
The imap_list function is an alias to imap_listmailbox.
imap_list_full
The imap_list_full function is an alias to imap_getmailboxes.
array imap_listmailbox(integer stream)
Use imap_listmailbox to get the name of every mailbox in an array.
<?
$mailbox=imap_open("{mail.server.com}INBOX",
"leon","password");
$mailboxes = imap_listmailbox($mailbox);
for($index = 0; $index < count($mailboxes);
$index++)
{
print($mailboxes[$index]. "
\n");
}
imap_close($mailbox);
?>
imap_listscan
The imap_listscan function is an alias for imap_scanmailbox.
integer imap_mail(string to, string subject, string message,
string headers, string cc, string bcc, string rpath)