CopyMessage Method

Copy a message from the current mailbox to another mailbox.

Syntax

object.CopyMessage( MessageNumber, MailboxName, [Options] )

Remarks

The CopyMessage method copies a message from the current mailbox to the specified mailbox. The message is appended to the mailbox, and the message flags and internal date are preserved. If the mailbox does not exist, the function will fail. To create a new mailbox, use the CreateMailbox method. A message can be copied within the same mailbox, in which case the server may flag it as a new message.

MessageNumber
The message identifier which specifies which message is to be copied to the mailbox. This value must be greater than zero and specify a valid message number.
MailboxName
A string which specifies the name of the mailbox that the message will be copied to. The mailbox must already exist, and the client must have the appropriate access rights to modify the mailbox.
Options
An optional parameter reserved for future use. This argument should either be omitted, or always be zero.

Return Value

A value of zero is returned if the method was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

CreateMailbox Method, CreateMessage Method, GetMessage Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.