The method for creating a folder is provided by the FolderOperations class:
Figure: The FolderOperations Class
Creating a folder
A folder can be created by specifying its name and parent folder and calling the createFolder method:
Parameters of method createFolder in detail:
|
Name |
Type |
Direction |
Description |
|---|---|---|---|
|
connection |
MailConnection |
In |
Specifies connection details such as server name, protocol etc. (see Mail Connection). |
|
parentFolder |
String |
In |
Specifies the name of the parent folder. If the parent folder is omitted (NULL or empty string), the new folder is created in the default folder of the server.
|
|
folder |
String |
In |
Specifies the name of the folder. |
|
return |
Boolean |
Return |
True, if the folder has been created. False otherwise. |