Skip to content

Commit fced910

Browse files
committed
moveToFolder does not move the message in case we provide uid #86
1 parent a0d3d1c commit fced910

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ $aMessage = $oFolder->getMessages('ALL', null, false, false);
317317
| restore | | | Restore a deleted Message |
318318
| copy | string $mailbox, int $options | | Copy the current Messages to a mailbox |
319319
| move | string $mailbox, int $options | | Move the current Messages to a mailbox |
320-
| moveToFolder | string $mailbox | | Move the Message into an other Folder |
320+
| moveToFolder | string $mailbox, int $options | | Move the Message into an other Folder |
321321
| setFlag | string or array $flag | boolean | Set one or many flags |
322322
| unsetFlag | string or array $flag | boolean | Unset one or many flags |
323323
| hasTextBody | | | Check if the Message has a text body |

src/IMAP/Message.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,14 +586,15 @@ private function getEncoding($structure) {
586586
/**
587587
* Move the Message into an other Folder
588588
*
589-
* @param string $mailbox
589+
* @param string $mailbox
590+
* @param integer $options [optional]
590591
*
591592
* @return bool
592593
*/
593-
public function moveToFolder($mailbox = 'INBOX') {
594+
public function moveToFolder($mailbox = 'INBOX', $options = 0) {
594595
$this->client->createFolder($mailbox);
595596

596-
return imap_mail_move($this->client->getConnection(), $this->msglist, $mailbox);
597+
return imap_mail_move($this->client->getConnection(), $this->msglist, $mailbox, $options);
597598
}
598599

599600
/**

0 commit comments

Comments
 (0)