note 77685 added to function.imap-open
| From: | bow+php dot net at virtual-habitat dot net | Date: | Sat, 08 Sep 2007 15:06:38 +0000 |
| Subject: | note 77685 added to function.imap-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130316@lists.php.net to get a copy of this message | ||
Setting a mailbox name (eg INBOX) at the end of the connection string does not work when using
imap_open() with OP_HALFOPEN. You may use imap_reopen() then.
<?php
/* this will fail : */
$connection = imap_open('{mx.example.net}INBOX', 'foo', 'secret',
OP_HALFOPEN.);
$num_mgs = imap_num_msg($connection);
imap_close($connection);
/* this will do : */
$connection = imap_open('{mx.example.net}INBOX', 'foo', 'secret',
OP_HALFOPEN.);
imap_reopen($connection, '{mx.example.net}INBOX');
$num_mgs = imap_num_msg($connection);
imap_close($connection);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 91.6.239.21
----
Manual Page -- http://www.php.net/manual/en/function.imap-open.php
Edit -- https://master.php.net/note/edit/77685
Del: integrated -- https://master.php.net/note/delete/77685/integrated
Del: useless -- https://master.php.net/note/delete/77685/useless
Del: bad code -- https://master.php.net/note/delete/77685/bad+code
Del: spam -- https://master.php.net/note/delete/77685/spam
Del: non-english -- https://master.php.net/note/delete/77685/non-english
Del: in docs -- https://master.php.net/note/delete/77685/in+docs
Del: other reasons-- https://master.php.net/note/delete/77685
Reject -- https://master.php.net/note/reject/77685
Search -- https://master.php.net/manage/user-notes.php