note 39392 rejected from function.imap-mail-move by betz
| From: | betz@php.net | Date: | Tue, 27 Jan 2004 10:23:32 +0000 |
| Subject: | note 39392 rejected from function.imap-mail-move by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64244@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster@netstyle.nl
----
Have either one of you tried to move a message between a user's Inbox on an Exchangeserver, to
a Public Folder on that same server, using Imap_mail_move() ????
Could it be done? I am really getting the feeling it can't be done.
Here's the chunk:
<?php
set_time_limit(1800);
$mbox = imap_open("{exchange:143}", "filer", "test");
$thirdbox = imap_open("{exchange:143}/*EAME/Delft", "filer", "test");
echo "<p><h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{exchange:143}", "*");
if ($folders == false) {
echo "Call failed<br />\n";
} else {
while (list ($key, $val) = each($folders)) {
echo $val . "<br />\n";
}
}
echo "<p><h1>Headers in INBOX</h1>\n";flush();
$headers = imap_headers($mbox);
if ($headers == false) {
echo "Call failed<br />\n";
} else {
while (list ($key, $val) = each ($headers)) {
echo $key . " " . $val . "<br />\n";
}
}
$movmsgid=1;
imap_mail_move($mbox,$movmsgid,'Public folders/*EAME/Delft');
$err=imap_errors();
print $err[0];
echo "<p><h1>Headers in Public Folders/*EAME/Delft</h1>\n";flush();
$headers = imap_headers($thirdbox);
if ($headers == false) {
echo "Call failed<br />\n";
} else {
while (list ($key, $val) = each ($headers)) {
echo $val . "<br />\n";
}
}
#imap_expunge($mbox);
imap_close($mbox);
?>
The error I get: There is no replica for that mailbox on this server.
While the first list clearly shows me the Public Folder is in fact there.
Suggestions?