Description
-
Fires when user wants to copy message to other
folder.
Syntax
-
Private Sub
object_CopyMessage(User,
Folder, Message, Destination,
Action)
The CopyMessage Event syntax has these parts:
object |
A wodImapServer
object. |
User |
An ImapUser object.
Reference to user who wants to copy message. |
Folder |
An ImapFolder
object. Reference to folder where message
originates. |
Message |
An ImapMessage
object. Reference to message that should be
copied. |
Destination |
An ImapFolder
object. Reference to destination folder. |
Action |
An ImapActions
enumeration, as described in settings. Return value you
should fill with either Allow or Deny value, depending
if you will allow user to copy message or not. |
Settings
-
The settings for Action are:
|
Deny |
0 |
Deny execution of the
action. |
|
Allow |
1 |
Allow to execute
action. |
Remarks
- CopyMessage event is fired when user wants to copy
message from one folder to another. Typical example is (on
some clients) when he copies message to Trash folder (and
then deletes original).
When message is copied to destination folder, it should
preserve message flags, but it should get new UID. To set
proper UID, wodImapServer will internally use Folder.NextMessageUID
property so you don't have to change it manually - unless
you want to.
Since message contents cannot be changed with wodImapServer,
you can freely just reference same file in Message.Filename
property. But beware - when message is deleted you
shouldn't delete referenced file if there are more
(copied) messages pointing to it.
|