note 100383 modified in function.imap-renamemailbox by danbrown

From: Date: Wed, 13 Oct 2010 22:20:23 +0000
Subject: note 100383 modified in function.imap-renamemailbox by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173204@lists.php.net to get a copy of this message
Don't forget that you can't be connected to the mailbox that you are going to rename (or delete). If you have the following mailboxes: INBOX INBOX.Foo ...and want to rename "INBOX.Foo" to "INBOX.Bar" you have to be connected to "INBOX": <?php $mbox = imap_open('{imap.example.com}INBOX', 'username', 'password'); imap_renamemailbox($mbox, '{imap.example.com}INBOX.Foo', '{imap.example.com}INBOX.Bar'); imap_close($mbox); ?> --was-- Don't forget that you can't be connected to the mailbox that you are going to rename (or delete). If you have the following mailboxes: INBOX INBOX.Foo ...and want to rename "INBOX.Foo" to "INBOX.Bar" you have to be connected to "INBOX": <?php $mbox = imap_open('{imap.server.com}INBOX', 'username', 'password'); imap_renamemailbox($mbox, '{imap.server.com}INBOX.Foo', '{imap.server.com}INBOX.Bar'); imap_close($mbox); ?> http://php.net/manual/en/function.imap-renamemailbox.php

« previous php.notes (#173204) next »