Topic Path: Pending > TIdIMAP4.UIDCopyMsgs@TStringList@String
ContentsIndexHome
PreviousUpNext
TIdIMAP4.UIDCopyMsgs@TStringList@String

Copies the indicated messages from the current mailbox to a specified mailbox.

Parameters 
Description 
AMsgUIDList 
Array of unique message identifiers for messages to be copied.
 
AMBName 
target mailbox name on the IMAP4 server. 

Boolean - True on success.

UIDCopyMsgs is a Boolean function used to copy a list of message unique identifiers in the currently selected mailbox to another mailbox on the IMAP4 server. 

AMsgUIDList is an Array of unique identifiers for messages to be copied. If the length of the array is 0, no action is performed and the method is exited. 

AMBName is the target mailbox on the IMAP4 server where a copy of the message will be stored. AMBName must represent an existing mailbox on the IMAP4 server that is valid for the currently connected Username and Password. 

Use of UIDCopyMsgs requires that a mailbox be previously selected using the SelectMailbox method, and that ConnectionState contains the value csSelected, or an EIdConnectionStateError exception will be raised. 

UIDCopyMsgs calls SendCmd to send the IMAP4 COPY command using the list of message identifiers and the value in AMBName. AMBName is UTF7-encoded prior to transmission. 

The return value for the method is True on successful completion of the IMAP4 COPY command. 

Use CopyMsg or UIDCopyMsg to copy a single message to a specified mailbox. 

Use CopyMsgs to copy messages in the currently selected mailbox using relative message numbers.

Exceptions 
Description 
With the message RSIMAP4ConnectionStateError

SelectMailBox ConnectionState EIdConnectionStateError SendCmd UIDCopyMsg UIDCopyMsgs CopyMsg CopyMsgs

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.