Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodiMailboxView.MoveTo

function MoveTo(const aIndices: TArray<Integer>; const aTarget: iMailboxView; out aSrcUids, aDstUids: TArray<Cardinal>; out aRemoved: TArray<Integer>): Boolean;
IMAP MOVE (RFC 6851). Each message named by aIndices (ascending message numbers in this view) leaves this folder and enters aTarget, another read-write view of the same store, by ONE RENAME of its file: at every instant, a crash included, the message is in exactly one of the two folders. Its flags travel with it. It gets a fresh base name, and a UID in aTarget that is reserved in aTarget's index before the first rename. aSrcUids and aDstUids are the UIDs of the messages that moved, element for element; aRemoved their message numbers in this view, DESCENDING. False when a message named did not move: it is still here, unchanged, and the UID reserved for it is never used. Store failures before the first rename raise eMailStoreError. A failure once a message may have moved - a rename, the target's keyword table or index, the source index - stops the move where it is and raises eMailExpungeError with the numbers that left, after aSrcUids and aDstUids are set for them. Keywords travel by name: each is looked up, or defined, in aTarget's table.