note 85764 added to function.imap-list
| From: | c6h1206free at gmail dot com | Date: | Tue, 16 Sep 2008 19:00:14 +0000 |
| Subject: | note 85764 added to function.imap-list | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144459@lists.php.net to get a copy of this message | ||
imap_list returns a simple array of strings that look just like the $ref parameter one needs to
specify:
<?php
$srv = '{imap.example.com}';
$conn = imap_open($srv, 'me', 'mypass');
$boxes = imap_list($conn, $srv, '*');
print_r($boxes);
imap_close($conn);
?>
Output:
<pre>
Array
(
[0] => {imap.example.com}Calendar
[1] => {imap.example.com}Contacts
[2] => {imap.example.com}Deleted Items
[3] => {imap.example.com}Drafts
[4] => {imap.example.com}Journal
[5] => {imap.example.com}Junk E-mail
[6] => {imap.example.com}Notes
[7] => {imap.example.com}Outbox
[8] => {imap.example.com}RSS Feeds
[9] => {imap.example.com}Sent Items
[10] => {imap.example.com}Tasks
)
</pre>
These directly fill in the $ref argument for every function that takes one.
----
Server IP: 209.41.74.194
Probable Submitter: 72.248.106.174
----
Manual Page -- http://www.php.net/manual/en/function.imap-list.php
Edit -- https://master.php.net/note/edit/85764
Del: integrated -- https://master.php.net/note/delete/85764/integrated
Del: useless -- https://master.php.net/note/delete/85764/useless
Del: bad code -- https://master.php.net/note/delete/85764/bad+code
Del: spam -- https://master.php.net/note/delete/85764/spam
Del: non-english -- https://master.php.net/note/delete/85764/non-english
Del: in docs -- https://master.php.net/note/delete/85764/in+docs
Del: other reasons-- https://master.php.net/note/delete/85764
Reject -- https://master.php.net/note/reject/85764
Search -- https://master.php.net/manage/user-notes.php