This is a discussion on moving messages on exchangeserver within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Have either one of you tried to move a message between a user's Inbox on an Exchangeserver, to a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |