Hunny Software Library Reference

Imap4Client.Copy Method

Sends a COPY command.

Overload List

Sends a COPY command with a range of message sequence numbers.

public void Copy(int,int,string);

Sends a COPY command with a single message sequence number.

public void Copy(int,string);

Sends a COPY command with a set of message sequence numbers.

public void Copy(string,string);

Remarks

A COPY command requests the server to copy one or more messages from the currently selected mailbox to a different mailbox.

The third version of the overloaded method allows multiple messages to be copied, as specified by a set of message sequence numbers. The messageSet parameter should specify a set of message sequence numbers in the syntax given in RFC 3501. In this syntax, individual sequence numbers or sequence number ranges are separated by commas, and ranges are indicated using a colon.

Example:

            // Copy messages 2, 4, and 6-10 to "saved" mailbox
            String set = "2,4,6:10";
            String mailboxName = "saved";
            client.Copy(set, mailboxName);
            

See Also

Imap4Client Class | Hunny.Mail Namespace | COPY command in the IMAP4 specification