You can move messages from one folder to another through calls to methods of the MoveMessage class:
Figure: The MoveMessage Class
Moving a Message
A message can be moved from one folder to another by specifying its ID and calling the moveMessage method:
Parameters of method moveMessage in detail:
|
Name |
Type |
Direction |
Remarks |
|---|---|---|---|
|
connection |
MailConnection |
In |
Specifies connection details such as server name, protocol etc. (see Mail Connection). |
|
id |
String |
In |
Id of the message. |
|
fromFolder |
String |
In |
Folder in which the message is located. |
|
toFolder |
String |
In |
Folder to which the message should be moved. |
Please note that POP3-Protocol does not support usage of folders. Therefore, the moveMessage will raise an exception if called when using POP3 protocol.